Reputation: 2005
Chapter 2 of Definitive JavaScript states that an identifier must begin with
$
, _
, or a letter
and be followed by the same + digits
.
It also states that letters and digits included Unicode letters and digits.
Where can I get a list to reference all of these.
Interestingly, you can do things like:
var é
I was just looking for an exact list or description that is not overly technical.
This is for ES-5
Upvotes: 0
Views: 86
Reputation: 27282
The ES5 spec explicitly lists which Unicode character categories are allowed in identifiers. Excluding Unicode escape sequences, here's a simplification of allowed identifiers:
So identifiers can start with:
$
_
After that, zero or more the following characters are also allowed (in addition to all the characters listed above):
Upvotes: 0