SOURCE

//数组方法

var a = [1,2,3,4,5]
//reverse
a.reverse();
console.log(a)
a.reverse()
//filter
let b = a.filter(item=> item>2)
console.log(b)
//join 数组转字符串
console.log(a.join(''));
//every
let c = a.every(i => i>2);
let d = a.every(i => i>0);
console.log(c,d)
//some
let f = a.some(i => i>2);
console.log(f)

console.log(a.reduce((pre,curr)=>pre+curr));
console.log('++++++++++');
console.log(a)

a.reduceRight((p,c)=>{
    console.log(p,c)
    return p-c
})
console 命令行工具 X clear

                    
>
console