How do I use an emoji in JavaScript?
Inline is easiest: const tada = "🎉". For escape sequences use the code-point syntax: "\u{1F389}".
To iterate over emojis correctly, use [...str] or Array.from(str) — plain str will split multi-code-point emojis (like skin-tone variants) in half.