Check if a string contains a substring in JavaScript. #javascript

preview_player
Показать описание
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.

It's a simple method that returns a boolean value depending on whether the string contains the substring or not.

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
Рекомендации по теме
welcome to shbcf.ru