Handle Unicode text, emoji, encoding, normalization, code points, and safe storage.
Lessons
Review the questions teams ask about Unicode.
Encoding Interview Questions is easiest to learn by reading the example, changing it, and observing the result.
const message = 'Hello नमस्ते 😀';
// Declare encoding in HTML: <meta charset="UTF-8">
console.log('Code points:', [...message].length);
console.log('UTF-8 bytes:', new TextEncoder().encode(message).length);
// Last character's code point in hex
const last = [...message].at(-1);
console.log(last, '-> U+' + last.codePointAt(0).toString(16).toUpperCase());Practice the Encoding Interview Questions example in a small scratch file, then explain what changed and why.