The value of the "$" character in JavaScript


What does the dollar sign ( $ ) mean in JavaScript? What is it responsible for and where is it appropriate to use it?


Nothing fancy, it just can be used in identifiers, unlike many other languages. That is, abc$def is a legitimate variable or function name, for example.

Have you confused javascript with the jQuery library for an hour? It uses $ under the name of a global variable. Again, no magic, just the name of the variable.

Scroll to Top