Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

大佬,全局对象global是怎么引入的?config/config.js文件 #178

Open
MrZhongLC opened this issue Jan 20, 2022 · 1 comment
Open

Comments

@MrZhongLC
Copy link

No description provided.

@MrZhongLC MrZhongLC reopened this Jan 20, 2022
@lfb
Copy link
Owner

lfb commented Aug 29, 2022

No description provided.

global对象,是node中的全局变量,类似浏览器中的window对象。global对象也有一个global属性引用自身。

module,exports,require,__dirname,__filename虽然可以全局访问,但他们并不属于global的属性,他们是每个模块引入时,包裹的匿名函数中的参数。

global对象的属性,是全局属性,在node中都可以直接访问。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants