Wednesday, March 12, 2014

Beginning a variable name with a dollar sign in jQuery...

...is a convention that is not mandatory which is often used to denote that the thing kept in the variable is a special as opposed to traditional variable. This says many things about the subject. Perhaps a DOM node in lieu of a string would end up in a variable starting with a $. Both the dollar sign and the underscore are legitimate characters to use in JavaScript in variable names. They look strange when we see them, but we can use them if we wish.

No comments:

Post a Comment