Searching in strings

There are new functions to determine whether a strings starts with, ends with, or includes a given string. This can give you much relief from using indexOf(...) and length-related calculations:

"Hello, there!".startsWith("He"); // true
"Hello, there!".endsWith("!"); // true
"Hello, there!".includes("her"); // true
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.86.134