const arr =[2,4,1,6] const res = arr.reduce((accumulator, currentValer) => accumulator+currentValer,0) console.log(res) function sum (a,b) { return a+b } const r = sum(2,3) console.log(r) const p1 = 2; const p2 = 3 Promise.all([p1,p2]).then(res=>{ console.log(res) })