Possible Duplicate:
Valid Characters for JavaScript Variable Names
I know that the ECMAScript specification says I can use µ (Greek lowercase Mu), and I have tested on a couple of browsers, but is it rock solid? Will it work with all browsers? What could be the pitfalls?
Technically I don't expect it is any different than jQuery using $ as a variable name - is there a technical difference?
Yes, you can use it.
In example:
var π = Math.PI;
as well as Unicode escape sequences.
Basically, the variable in JavaScript can be anything that's valid according to ECMAScript 5.1 and Unicode 6.1.
Here is some online JavaScript variable name validator.
For the references, this page is for documenting the differences between ES5 specification and the requirements for ECMAScript implementations in web browsers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With