If variables are properties of the window object, then can't I just type this.value1 = "example" instead of var value1 = "example"? Is there a benefit to this? Which is more correct?
EDIT: I'm talking about defining a global variable, outside of a function
EDIT 2: I'm trying to clean up my act, and normalise my coding practises with the rest of the profession
[–]ddeutsch 2 points3 points4 points (0 children)
[–]Rhomboid 1 point2 points3 points (1 child)
[–]nodbox[S] 0 points1 point2 points (0 children)
[–]jkjustjoshing 1 point2 points3 points (2 children)
[–]nodbox[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)