startsWIth and endsWith methods | String Object In JavaScript

🎁 Join my channel to get access to perks:

🧡 Hello All JavaScript Lovers Outhere!

Today you’re going to learn about the String Object In JavaScript.

This tutorial is a series of videos, in each video we will discuss a method (or more) of the String Object in JavaScript.

In today’s video, you’re going to learn about startsWith and endsWith methods.

The startsWith and endsWith methods both return a Boolean true or false, based on whether a string starts (ends) with another string or not.

🟢🟠 The string.startsWith() method
🔷 Syntax:
startsWith(searchString, position)
🔹searchString : The characters to be searched for at the start of this string.
🔹 position (Optional) : The position in this string at which to begin searching for searchString. Defaults to 0.

🟢🟠 The string.endsWith() method
🔷 Syntax:
endsWith(searchString, length)
🔹searchString : The characters to be searched for at the start of this string.
🔹 length (Optional) : If provided, it is used as the length of str. Defaults to str.length.

🌍 Social Media Links.
◾ Facebook :
◾ Twitter :
◾ Instagram :
◾ GitHub :

💲 Suppport the Channel
Paypal :
Buy Me a Coffee:

JavaScript For Beginner

JavaScript for beginner|JavaScript for beginner

JavaScript For Beginner

If you’re just starting out with JavaScript, you’ll find this course useful. It’s free and covers the basics as well as more advanced topics, such as prototypical inheritance, functional programming, function constructors, and the new ES6 language. Besides helping you learn the basics, this course will also improve your skills in other technologies. It’s a great way to quickly get started with this exciting new language.

You May Also Like