JavaScript strings are not byte strings, nor are they even Unicode strings. They are UTF-16 strings. Most characters, including international ones, are a single element in a JavaScript string. But some characters (including most emojis) fall outside the Basic Multilingual Plane and thus appear as two elements in a JavaScript string.
Example:
> "♫".length
1
> "