This article covers all the basic important string methods that are used in JavaScript usually.
This is the method which is the easiest to understand and its very commonly used. It is used when we need to check what is the length of the string.
For example:
const name = 'lumishka';
console.log(name.length);
Output:
8
This returns 8 because there are 8 letters in the string.
There are 3 main methods for extracting string characters:
at() methodcharAt() methodcharCodeAt() methodEssentially all of them do the same work i.e. extracting characters from a string from a specific position. However there are few minor differences between them which will be covered here.