JavaScript String charAt()
JavaScript String charAt()
The charAt() method is used to return the character at a specified index in a string. The index of a string is like an array that starts from 0 and so on.
Syntax:-
Its syntax is:- string.charAt(index)
Return:-
Its return is:- the character at the specified index in the string.
Further Explanation:-
Parameter | Description |
index | Optional. The index of the character. |