Globally Aware
The global scope is present and relevant in every JS program, even though modern patterns for organizing code into modules de-emphasizes much of the reliance on storing identifiers in that namespace.
Still, as our code proliferates more and more beyond the confines of the browser, it’s especially important we have a solid grasp on the differences in how the global scope (and global scope object!) behave across different JS environments.
With the big picture of global scope now sharper in focus, the next chapter again descends into the deeper details of lexical scope, examining how and when variables can be used.
当前内容版权归 You-Dont-Know-JS 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 You-Dont-Know-JS .