JavaScript’s internal character encoding: UCS-2 or UTF-16?

1 · Mathias Bynens · Jan. 17, 2012, 10:18 p.m.
Does JavaScript use UCS-2 or UTF-16 encoding? Since I couldn’t find a definitive answer to this question anywhere, I decided to look into it. The answer depends on what you’re referring to: the JavaScript engine, or JavaScript at the language level....