Handle Unicode text, emoji, encoding, normalization, code points, and safe storage.
Lessons
Convert between strings and byte arrays.
TextEncoder & TextDecoder is easiest to learn by reading the example, changing it, and observing the result.
// String -> UTF-8 bytes
const bytes = new TextEncoder().encode('Hello 😀');
console.log(bytes); // Uint8Array(10) [...]
// UTF-8 bytes -> String
const text = new TextDecoder('utf-8').decode(bytes);
console.log(text); // "Hello 😀"Practice the TextEncoder & TextDecoder example in a small scratch file, then explain what changed and why.