SOURCE

var sum1 = arr.reduce(function(prev, next, index, array) {
    var a = []
    return a.push(prev) ;
})
var sum2 = arr.reduceRight(function(last, before, index, array) {
    var b = []
    return b.push(last) 
})
function add1(arr1,arr2){
    return a.concat(b)
}
console 命令行工具 X clear

                    
>
console