¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita+ 2
Why would indexOf method give me a -1 as an output ?
2 Respuestas
+ 6
-1 means here that it's index cannot be found, so the letter or char sequence you looked for isn't present in the string.
+ 4
It just means your target was not found.