11/26/2023 0 Comments Empire earth 3 ita![]() ![]() Let’s say you following string let title = '12 Ways to Tell Someone Is Really Intelligent' Old way: Before ES6, () method was used to check whether a string contains a substring, which returns -1 when a substring cannot be found. It returns a boolean value of true if the string is found, otherwise false. () method checks if one string may be found within another string. In this tutorial, I am going to show you a very simple, fast, and modern(ES6) way to check whether a string contains a substring in JavaScript.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |