Handle Unicode text, emoji, encoding, normalization, code points, and safe storage.
Lessons
Work with Unicode strings in the browser and Node.
UTF-8 in JavaScript is easiest to learn by reading the example, changing it, and observing the result.
const text = 'café 😀';
// Iterate by code point (emoji-safe), not by UTF-16 unit
for (const ch of text) process(ch);
const chars = [...text];
// Normalize before comparing user input
const a = 'café';
console.log(a.normalize('NFC') === 'café'.normalize('NFC')); // truePractice the UTF-8 in JavaScript example in a small scratch file, then explain what changed and why.