SOURCE

function sum(arr) {
    function getSum(total, num) {
        return total + num;
    }
    return arr.reduce(getSum)
}
console 命令行工具 X clear

                    
>
console