← TechnologyThe essentials of

codePointAt(): the code point is not a visible character

Publisher: ResumeMaker • 1 source

Published: 22 Oct 2026 13:13 · Updated: 22 Oct 2026 13:13

AI source check: 21 Oct 2026 12:40. This is not editorial approval.

In a few sentences

In brief

The index remains a position in the UTF-16 representation of the string.

Useful to know

codePointAt() returns the Unicode code point at a specified position. In case of a symbol outside the Basic Multilingual Plane, the method can read the pair of UTF-16 units if the index points to the its beginning. [1]

For example, "😀".codePointAt(0) is 128512. This does not mean that every visible sign consists of one code point: combinations of emoji and diacritics can be more complex. To limit visible symbols or move a cursor, grapheme segmentation is needed, not just an increase in a number index.

Sources

For further detail and to check the information:

  1. [1] MDN — String.codePointAt ↗