module 直接调用const显示undefine
来源:3-1 环境 & 调试 ——CommonJS1

慕慕7001127
2019-09-17
file里面有这两句话的时候,执行结果是undefine.
为什呢?
#01_run.js
const tst = 'test';
console.log(module.tst);
写回答
2回答
-
Samaritan
2019-11-08
内部用的就是本地变量了
00 -
qq_乐乐乐_1
2019-10-09
你打印一下module,,,console.log(module);
,你会知道为什么。00
相似问题