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
Nesta página do site você pode assistir ao vídeo on-line Check if a string contains a substring in JavaScript. duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Anil Bhatt 01 Agosto 2022, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 1,592 vezes e gostou 34 espectadores. Boa visualização!