According to ECMA 262 both versions 3 and 5 variable name may contain chars escaped by \uHHHH
. So var ы;
and var \044b;
is essentially the same.
The Syntax section there also states that variable name cannot be equal to any of the reserved words. So var this;
is surely invalid.
But what happens if var \0074his
is encountered?
Specs doesn't clearly explain this. "Unicode escape sequences are also permitted in an IdentifierName, where they contribute a single character to the IdentifierName...". Great, but does it mean that escape sequence must be unescaped prior to comparsion with reserved kerwords or not?
In other words, is \0074his
the same as this
?