Saturday, January 17, 2015

underscore (-) and dollars sign ($) in Javascript variables and functions





 underscore (-) and dollars sign ($) in Javascript variables are the same as other characters such as letters and number. For example _$.area is the as as other JS variables course123, c3 etc.

For dollars sign ($) in Javascript function may have special meaning, for example $() in jQuery represnets to call jQuery library. _() in Underscore.js call underscorelibrary.

No comments:

Post a Comment