String methods : startsWith in Javascript.

Learn about the startsWith method of string object in Javascript.

The startsWith() method returns true if the given characters are found at the beginning of the string, otherwise, false.


If you want this method to be non case-sensitive then we can write a custom function


We can also specify the position from which to begin searching for searchString.


If you find this helpful surprise 🎁 me here.

Share if you feel happy 😃 😆 🙂 .

Follow Javascript Jeep🚙 if you feel worthy.

Leave a comment

Design a site like this with WordPress.com
Get started