The reason $ was actually introduced as a valid variable name in the ECMA specs was to distinguish machine generated code from human written code .
Most JS libraries use $ because it is very rare that you would want to name some of your variable $ and hence it would avoid collision and accidental overwriting of the variable . ( However now since every library is using $ , if you want to use two libraries , you are in a soup ) .
I can only assume but I think it is more "visible" than a single character or the underscore
Or to put it another way: It is the shortest possible identifier that stands out of the crowd.
Not completely random - many of the shell languages in unix use
$ to signify a variable, and this has been the source of this "tradition".
Rules for naming variables:
The first character must be a letter, or an underscore (_), or a dollar sign ($).
The subsequent characters can be letters, numbers, underscores, or dollar signs.
The variable must not contain any embedded space characte`rs.
So in answer to your question, it's just used as a prefix to differentiate between the library and other variables you might use.
It's a valid variable name that is short and (theoretically) wouldn't be used often. People wouldn't appreciate typing out
xtremeFramework every time they wanted to use it or have it conflict with their variable
I think it is just to make it stand out from the common variable names .
©2020 All rights reserved.