3 ms·
the '$' is just another character from the view of the javascript interpreter. It just so happens you can use A-Z, 0-9, underscore, and the dollar sign as vari
by catch23 16y ago
the '$' is just another character from the view of the javascript interpreter. It just so happens you can use A-Z, 0-9, underscore, and the dollar sign as variable names. Libraries like Prototype & jQuery have popularized using the dollar sign as a globally accessible namespace variable, but it's nothing more than just another character.
- pyre 16y agoI think that the parent is referring to the Chrome console which has (IIRC) jQuery baked into it, even if jQuery isn't part of the actual page.
- catch23 16y agoDoes it? I don't see it in mine. HN doesn't use jQuery and when I fire up my console, the $ variable is not overwritten with a jQuery object, also there is no jQuery variable available.