Clicksco / Front-End

Organisation Front End Documentation & Tooling
http://docs.clicksco.com/frontend
2 stars 1 forks source link

You MUST always use the var keyword when declaring variables #63

Closed BenjaminRCooper closed 10 years ago

BenjaminRCooper commented 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"
timgale commented 10 years ago

+1

iamrossgrant commented 10 years ago

+1

jonspark commented 10 years ago

+1

ampersarnie commented 10 years ago

+1

BenjaminRCooper commented 10 years ago

Implemented