How do I use an emoji in JavaScript?

In: Emojis for Developers

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.

Read about How do I use an emoji in JavaScript? in