This method returns a character's Unicode value from a string by referring to its index within that string.
The characters in a string are indexed from left to right with the first character indexed as 0 and the last as String.length - 1.
myString = new String("charCodeAt method demonstration.")
document.write (myString.charCodeAt(2))This code reads a character from the string at the specified index and writes its Unicode value to the document.