我知道模块化可以这么写:
module.exports = {
a: function(){
console.log("这是a");
},
b: function(){
console.log("这是b");
}
}
请问可以这么写吗?
module.exports = function(){
console.log("这是模块");
}
大家讲道理2017-04-17 15:41:12
....Can't you just try it yourself? There is an object everywhere above and a function everywhere below. . . Any questions? practice. . Out of true knowledge. . .