DEV Community

Discussion on: Scope in Modern JavaScript

Collapse
 
naftalimurgor profile image
Naftali Murgor

True, var is function scoped. Thanks for the feedback. Using var would be detrimental because it gets hoisted.