Javascript uses UTF-16, not UCS-2. An tragic historical mistake. I imagine they would use UTF-8 if they got a chance to do it all over again.
It's because JavaScript was created in 1995. At that time, everyone believed UCS-2 was "all you'd ever need". Well, Westerners believed it. It's why Han Unification existed; to try to perpetuate that lie. It's why Windows is UTF-16 at its core.
Witching the default encoding is easy. Ask the python people. /s