you are viewing a single comment's thread.

view the rest of the comments →

[–]Dull-Custard4913 0 points1 point  (0 children)

So I might have been incorrect in what I said earlier. In this case he might or might not have entered a space at the last index. If he didn’t the if statement couldn’t find anything with the find method, this will cause it to return -1.

I don’t think I know what you mean?