There is no default character encoding for JavaScript as such. A JavaScript program is, as far as specifications are concerned, a sequence of abstract characters. When transmitted over a network, or just stored in a computer, the abstract characters must be encoded somehow, but the mechanisms for it are not controlled by the ECMAScript standard.
Section 6 of the ECMAScript standard uses UTF-16 as a reference encoding, but does not designate it as default. Using UTF−16 as reference is logically unnecessary (it would suffice to refer to Unicode numbers) but it was probably assumed to help people.
This issue should not be confused with the interpretation of string literals or strings in general. A literal like 'Φ' needs to be in some encoding, along with the rest of the program; this can be any encoding, but after the encoding has been resolved, the literal will be interpreted as an integer according to the Unicode number of the character.
When a JavaScript program is transmitted as such (as an “external JavaScript file”) over the Internet, RFC 4329, Scripting Media Types, applies. Clause 4 defines the mechanism: Primarily, headers such as HTTP headers are checked, and a charset
parameter there will be trusted on. (In practice, web servers usually don’t specify such a parameter for JavaScript programs.) Second, BOM detection is applied. Failing that, UTF-8 is implied.
The first part of the mechanism is somewhat ambiguous. It might be interpreted as relating to charset
parameter in an actual HTTP header only, or might might be extended to charset
parameters in script
elements.
If a JavaScript program appears as embedded in HTML, either via a script
element or some event attribute, then its character encoding is of course the same as that of the HTML document. Section Specifying the character encoding of the HTML 4.01 spec defines the resolution mechanism, in this order: charset
in HTTP header, charset
in meta
, charset
in a link that was followed to access the document, and finally heuristics (guesswork), which may involved many things; cf. to the complex resolution mechanism in the HTML5 draft.