Closed BenjaminRCooper closed 10 years ago
Omitting the var keyword will pollute the global namespace and could lead to unexpected results within your script.
Bad Example
myGlobalVariable = "This is incorrect"
Good Example
var myLocalVariable = "This is correct"
+1
Implemented
Omitting the var keyword will pollute the global namespace and could lead to unexpected results within your script.
Bad Example
Good Example