Additional String Methods
Discover how to use new ES6 string methods including startsWith, endsWith, includes, and repeat to manipulate strings effectively in JavaScript. Understand their syntax and practical uses to improve your code.
We'll cover the following...
We'll cover the following...
There are many methods that we can use against strings. Here’s a list of a few of them:
indexOf()
Gets the position of the first occurrence of the specified value in a string.
slice()
Pulls a specified part of a string as a new string.
toUpperCase()
Turns all characters of a string to uppercase.
toLowerCase()