Returns a number indicating the Unicode value of the character at the given index.
Method of String
Syntax
charCodeAt( [index] )
Parameters
Parameter | Description |
---|---|
index | An integer between 0 and 1 less than the length of the string. The default value is 0. |
Description
Unicode values range from 0 to 65,535. The first 128 Unicode values are a direct match of the ASCII character set.
Example
The following example returns 65, the Unicode value for A.