global
- <Object> 全局命名空间对象。
在浏览器中,顶层作用域是全局作用域。这意味着在浏览器中,var something 会定义一个新的全局变量。在 Node.js 中情况则不同。顶层作用域并非全局作用域;在 Node.js 模块中,var something 将只在该模块内局部有效。
【In browsers, the top-level scope is the global scope. This means that
within the browser var something will define a new global variable. In
Node.js this is different. The top-level scope is not the global scope;
var something inside a Node.js module will be local to that module.】