最赞回答 / Linaer000
var index = require('./index'); var klass = [{klass:'三年二班', teacherName:'苍进空', students:['白富美','高富帅']},{klass:'二年二班', teacherName:'苍进空', students:['白富美','高富帅']}]; index.add(klass);可以这么优化一下就完美了。
2018-05-23
最新回答 / 执着的木乃伊
暴露的时候尽量用module.exports = { xx, xxx } 这种格式,引入用const { xx, xxx } = require('xxxxx')exports只是module.exports的引用
2018-04-19
最新回答 / 慕粉1470305008
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community>cd E:\网页\me_to\js_lxC:\Program Files (x86)\Microsoft Visual Studio\2017\Community>node ***.jsmodule.js:327 throw err; ^Error: Cannot find module 'C:\Program Files (x86)\Microsoft Vi...
2018-04-15