Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is "$" a valid function identifier? [duplicate]

Possible Duplicates:
Can someone explain the dollar sign in Javascript?
Why would a javascript variable start with a dollar sign?

Why is it that I can assign a function to $ in Javascript, but not # or ^ ?

like image 327
Mark Avatar asked Jan 25 '11 15:01

Mark


1 Answers

From the ECMA standard (Section 7.6)

The dollar sign ($) and the underscore (_) are permitted anywhere in an IdentifierName.

like image 86
El Ronnoco Avatar answered Oct 01 '22 04:10

El Ronnoco