In Documentation, String.substring() ending position is confusing

The Docs read

Returns a substring of the character string, starting at index i1 and ending at index i2

is confusing, it sounds like the returned string will include ending index. But it doesn't. In the console, if I do


which says the ending index is exclusive, not inclusive.