Node 中的 this 和 global

288 阅读1分钟

Node 中的 this 和 global

使用node命令来执行一个文件,他会把这个文件当成一个模块,默认把this修改成{}this = module.exports = exports),但是自执行函数(箭头函数除外)里的thisglobal