PDA

View Full Version : when declaring a variable....



jeremy*
October 13th, 2003, 04:00 PM
when declaring a variable how important is it to use "var"
var myVar1 = 2;
vs.
myVar1 = 2;

is it just preference/someting from another language that you are used to, or have you noticed problems when you leave it out. I think I have used it both ways, but would like to avoid any possible problems that might occur.

and when referring to it do you use var, or skip it.