10 Important string methods of Javascript
- charAt(): The charAt() method returns the character at the specific index in the string.
2. concat(): The concat() method used because joins two or more string.
3. lastIndexOf() : The lastIndexOf() method returns the position of the last fact of a specified value in a string.
4. slice(): The slice() method on the string takes out a part and Let’s return a new part without changing.
5. split(): The splice() method The split() method is used to split a string into an array of substrings and returns the new array.
Get Akbor Hossain Rifat’s stories in your inbox
Join Medium for free to get updates from this writer.
6. substr(): The substr() method returns the length of a stretched string for a given number of characters starting from the specified position.
7. trim(): The trim() method removes whitespace from both ends of a string.
8. trimStart: The trim() method removes whitespace from the start of a string.
9. trimEnd: The trimEnd() method removes whitespace from the end of a string.
10. startsWith: The startsWith() method determines whether a string begins with the characters of a specified string. This method is used to verify it. Its return true or false.But remember startsWith() method case sensitive.







