UTF-16 and Surrogate Pairs
One unit for the BMP
UTF-16 uses 16-bit code units. Characters from U+0000 to U+FFFF fit in one unit, including A (0041) and the euro sign (20AC).
The Basic Multilingual Plane covers most common scripts and symbols, so many UTF-16 strings look compact.
Astral characters need pairs
Code points above U+FFFF are encoded as a surrogate pair: a high surrogate in D800-DBFF and a low surrogate in DC00-DFFF.
The grinning face U+1F600 becomes D83D DE00. JavaScript strings expose these as two UTF-16 code units unless you iterate by code point.
Compare with UTF-8
UTF-8 and UTF-16 represent the same code points differently. UTF-8 is byte-oriented and ASCII-compatible; UTF-16 is unit-oriented and needs byte order handling.
For web text, UTF-8 remains the practical default even though UTF-16 appears in many operating system and language internals.