|
|
|
|
|
by glesperance
4817 days ago
|
|
> We've added file-level JavaScript variable scoping. Variables declared
with `var` at the outermost level of a JavaScript source file are now
private to that file. Remove the `var` to share a value between files. I think it is convenient to be able to declare global variables like that but perhaps there should be a way to monitor those ; in other words, it would be really convenient to have some form of alert system to notify you when a new global variable is created. That way, globals created by mistakenly forgetting the 'var' keyword would be easily spotted. |
|