JavaScript String charCodeAt()
JavaScript String charCodeAt()
The charCodeAt() method is used to return the Unicode of the character at a specified index in a string. The index of the first character is 0 and so on. Therefore, we can say the index of the last character will be length - 1.
Syntax:-
Its syntax is:- string.charCodeAt(index)
Return:-
Its return is:- Unicode of character at a specific index
Further Explanation:-
Parameter | Description |
index | Optional. The index of a character. |