I understand the use of the (single) dollar sign in popular JavaScript libraries such as jQuery and Prototype. I also understand the significance of the double dollar sign i
Well really, it's just the naming convention of the developer. "$$
" might as well as be "aa
", for all intents and purposes.
As you mentioned, the single dollar sign function $()
has become almost-standard in various JavaScript libraries. "The one function to rule them all", eh? But remember, it's nothing inherent to JS itself. It's just a function name that caught on to replace document.getElementById()
.
So, with that said, $$
could be anything. Heck, you could even have a function like this:
function $$$$$$$$(){
//i've got dollar signs in my eyes!
}
In other words, it's just a variable/function name—just like all the rest.