let arr = [1, 2, 3, 4, 5, 6, 7, 8];
let val = arr.reduce((val1, val2)=>{
return val1*val2;
});
console.log(val); // 40320
let arr = [1, 2, 3, 4, 5, 6, 7, 8];
let val = arr.reduce((val1, val2)=>{
return val1*val2;
});
console.log(val); // 40320