Bob Downs

You are not required to use the var keyword to declare a variable. However, omission of the var keyword affects where a variable can be used in a script. In addition, declaring variables without the var keyword can make it more challenging later to identify where in a program a variable is first declared. For these reasons, it is good programming practice to always use the var keyword when declaring a variable in JavaScript.
Bob Downs
var keyword required or not
JavaScript: The Web Warrior Series
Rate this book
Clear rating