From what i understand, JavaScript requires variable to be defined using var
keyword, and jQuery allows to define variables using $
symbol, I am wondering what added benefits does it bring when i define variable using jQuery, or is it purely preference? why will i use one convention over the other?
Also, what is the difference between the following variable declarations?
var foo
var $oo
$foo