test_wy
Version:
一颗赛艇
35 lines (27 loc) • 566 B
JavaScript
const add = (x,y) => {
return x + y
}
const substrict = (x,y) => {
return x - y
}
const chen = (x,y) => {
return x * y
}
const divide = (x,y) => {
return x / y
}
// const name = "小明"
// 导出成一个对象
module.exports = {
add,
substrict,
chen,
divide
}
// module.exports = name
// 导出对象的其它写法
// module.exports.add = add
// module.exports.substrict = substrict
// 导出对象的其它写法2【老外喜欢用】
// exports.add = add
// exports.substrict = substrict