ES-Next: Esnextis similar to traceur, you can use command line to compile files. Install: npm install esnext -g Here's how to compile a single file an print it to stdout: esnext myfile.js To compile many files at once, specify an output directory: es…
//数组的累加方法 let arr=[1,2,3]; let sum=arr.reduce((prev,cur)=>{ return prev+cur; }) console.log(sum)//----6 //阶乘2的2次方的3次方 let arr=[2,2,3]; let sum=arr.reduce((prev,cur)=>{ return Math.pow(prev,cur); }) console.log(sum)//-----64 //阶乘2的2次方的3次方 es6方法 let a…