GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing www.geeksforgeeks.org — JavaScript String charCodeAt() Method - GeeksforGeeks JavaScript String charCodeAt() MethodLast Updated : 16 Jan, 2026 The JavaScript str.charCodeAt() method returns the Unicode code unit of the character at a given index in a string.
Syntax:str.charCodeAt(index)Parameters:This method takes one parameter called index to identify a character in the string. It uses this index to work with the Unicode value of that character.
Return value:This method returns a numeric value based on the character’s Unicode code. The value depends on the index you provide.
[Example 1]: This example shows the basic use of the String.prototype.charCodeAt() Method.
[Example 2]: In this example, the method charCodeAt() extracts the character from the string at index 4. Since this character is m, therefore this method returns the Unicode sequence as 109.
[Example 3]: In this example, the method charCodeAt() extracts the character from the string at index 20. Since the index is out of bounds for the string, therefore this method returns the answer as NaN.
Comment Explore |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |