Mistake in 22. Substrings


#1

In 22. Substrings it says

More examples:

  1. First 3 letters of "Batman"
    "Batman".substring(0,3);

Shouldn't it be .substring(0,2) to see the first 3 letters?

No sorry everything is all right! I was wrong haha


#2

that's because the substring method method works like this

str.substring(start_index, end_index -1);

the substring method will always end one index less that what you provided