What is the root object in Node.js

后端 未结 1 1817
长情又很酷
长情又很酷 2020-12-03 14:25

You may know the global object in Node.js:

{Object} The global namespace object.

In browsers, the top-level scope is the global scope. T

1条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-03 15:04

    It is exactly the same as global.

    There are a few undocumented properties like this. They date from early days of node but were left in to maintain backwards-compatibility and there is no pressing need to remove them.

    You shouldn't use them in any new code, as they could be removed at any future time.

    0 讨论(0)
提交回复
热议问题