SOURCE

function sum(a,b) {
    if(b) {
        return a + b
    } else {
        return function(c) {
            return a + c
        }
    }
}

console.log(sum(2)(3))
console 命令行工具 X clear

                    
>
console