When verifying that character is NOT in string, is it both the same when using if(string.indexOf("x") < 0) { ... } or if(string.indexOf("x") == -1) { ... }?
Could there be some circumstances when string.indexOf("x") would be -2 or lower?
Thank you for sharing your experiences.
-1if sub string not found in the string. There is no chance to return values below that.