1. Calculate the length of the string
var txt="Hello World!"
document.write(txt.length)
2.indexOf() method
How to use indexOf () to locate the first occurrence of a specified character in a string.
3.match() method
searches for a specific character in a string, and if found, returns this character.
4. How to replace characters in a string - replace()
Use the replace() method to replace certain characters with other characters in a string.