I'm working with a developer that never uses var when declaring variables in jQuery. Something like:
$x = "hello";
$y = "world";
$a = x + " " + y;
jQuery doesn't have a problem with this and he's been doing this for awhile. I've always used var:
var x = "hello";
var y = "world";
var a = x + " " + y;
We have run into one issue where the dollar sign caused an issue (it was a year ago so I can't recall the issue).
Does anyone know or have info on the difference between the two and why one is better or should be used over the other?
I've done some Google searching but they all talk about var $x; vs var x;