| title | ms.custom | ms.date | ms.prod | ms.reviewer | ms.suite | ms.technology | ms.tgt_pltfrm | ms.topic | f1_keywords | dev_langs | helpviewer_keywords | ms.assetid | caps.latest.revision | author | ms.author | manager | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
charCodeAt Method (String) (JavaScript) | Microsoft Docs |
01/18/2017 |
windows-client-threshold |
|
language-reference |
|
|
|
5b0290a7-ee4d-4738-a909-c02ef64a2f1a |
12 |
mikejo5000 |
mikejo |
ghogen |
Returns the Unicode value of the character at the specified location.
strObj. charCodeAt(index)
strObj
Required. Any String object or string literal.
index
Required. The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.
The following example illustrates the use of the charCodeAt method.
var str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
document.write(str.charCodeAt(str.length - 1));
// Output: 90 [!INCLUDEjsv55]