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