跳到主要内容
CNode

exports 和 module.exports 的区别[精简版]

分享
NNextZeus发布于 10 年前最后回复 10 年前
235470
  • exports 是指向的 module.exports 的引用

  • module.exports 初始值为一个空对象 {},所以 exports 初始值也是 {}

  • require() 返回的是 module.exports 而不是 exports

查看回复

回复 (2)

H
hezhongfeng#110 年前

其实大部分人,知道怎么使用就可以了~要知道为什么这么用的话就得知道这些了 对不?

参与回复

登录后即可参与回复。登录