Dmitri Pavlutin 8/4/2020

What Actually is a String in JavaScript?

Read Original

This technical article dives into the JavaScript String type, explaining that strings are sequences of UTF-16 code units rather than simple sequences of visible characters. It details why the `.length` property can return unexpected values (like 2 for a single emoji) and covers concepts like the Basic Multilingual Plane and surrogate pairs.

What Actually is a String in JavaScript?

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

1
The Beautiful Web
Jens Oliver Meiert 2 votes
3
LLM Use in the Python Source Code
Miguel Grinberg 1 votes
4
Wagon’s algorithm in Python
John D. Cook 1 votes