function sum(number1) {
return function(number2) {
return number1+number2
}
}
console.log(sum(1)(2)); //3
一个高级的点的写法
推荐一个详细的讲解:https://blog.csdn.net/weixin_33994444/article/details/88020426
function sum(number1) {
return function(number2) {
return number1+number2
}
}
console.log(sum(1)(2)); //3
一个高级的点的写法
推荐一个详细的讲解:https://blog.csdn.net/weixin_33994444/article/details/88020426