In this short video, I tried to quickly tell you all about the includes() method and indexOf() method in JavaScript, used to find the substring in a string.
String.includes() :-
It's a simple method that returns a boolean value depending on whether the string contains the substring or not.
String.indexOf() :-
This method returns the index of the substring, you need to compare it to -1 to know if the substring was found or not.
Thanks for watching.
#javascript
En esta página del sitio puede ver el video en línea Check if a string contains a substring in JavaScript. de Duración hora minuto segunda en buena calidad , que subió el usuario Anil Bhatt 01 agosto 2022, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 1,592 veces y le gustó 34 a los espectadores. Disfruta viendo!