A模块代码*(准备暴露add方法)
const add = (n1, n2) => n1 + n2; exports.add = add;
B模块(接受A模块add方法)
//const a = require('./a.js'); const a = require('./a'); console.log(a.add(10, 20));