Javascript string charCodeAt() is an inbuilt function that returns the Unicode of the first character in a string. The charCodeAt() method returns the Unicode of the character at the specified index in the string. An index of the first character is 0, the second character 1, and so on.

Javascript String charCodeAt() Example

The syntax of String charCodeAt() function is following.

string.charCodeAt(index)

The index parameter is required, and a number representing the index of the character you want to return.

The charCodeAt method returns “NaN” if there is no character at the specified index, or if the index is less than “0”.

#javascript #js #javascript string charcodeat

Javascript String charCodeAt() Example | String.Prototype.CharCodeAt()
1.75 GEEK