By the end of this article, you will have the ability to understand how text manipulation works. I will use the terms string and text interchangeably without getting scientific.
Here in this snapshot you can see the text length
Find the first position of a character searching from left-to-right.
Here we are finding the sting position by using
indexOf() method you next to pass the which character you want to get the positions.
In this snap we are finding the “!” position.
- Here we can check of any string starting with any specific character.
- It return True or False value
const text = "Hello!" const result = text.startsWith('H') console.log("imsav log===>", result);