Tin mới
JavaScript: Scripting language
Web APIs: Programming interfaces
Structuring content with HTML module
Dynamic scripting with JavaScript module
String.prototype.codePointAt()
The charCodeAt() method of String values returns an integer between 0 and 65535 representing the UTF-16 code unit at the given index.
Zero-based index of the character to be returned. Converted to an integer — undefined is converted to 0.
UTF-16 characters, Unicode code points, and grapheme clusters
Characters in a string are indexed from left to right. The index of the first character is 0, and the index of the last character in a string called str is str.length - 1.
This page was last modified on Jul 10, 2025 by MDN contributors.