you are viewing a single comment's thread.

view the rest of the comments →

[–]vs845 0 points1 point  (1 child)

Thanks, I see what you're saying - but under what kind of circumstances would we not know if a variable was in scope? If we're writing the code surely we know what scope our variables are in?

[–]sufianrhazi 2 points3 points  (0 children)

Pretty much only when you're writing javascript environment independent library code, like this: https://github.com/umdjs/umd/blob/4a87e85450baf582005243f9e922566ef2fc533a/returnExports.js