<code>"abcdefg".indexOf("de")</code> returns
- A
4
- B
2
- C
−1
- Dcheck_circle
3
Explanation
First match starts at index 3.
AP Computer Science A· difficulty 3/5
<code>"abcdefg".indexOf("de")</code> returns
4
2
−1
3
Explanation
First match starts at index 3.
Want 10 more like this — adaptive to your weak spots?