the reduce method that get only one item from the all of the array::

PHOTO EMBED

Thu May 04 2023 14:01:19 GMT+0000 (Coordinated Universal Time)

Saved by @Himanshu007 #javascript

let arrNum = [10, 20, 30, 40, 50, 60];
let reducedArr = arrNum.reduce(function (f , s) {
    // (f) for the first element (s) for the seconde element ;
    return f *= s;
});
console.log("reduced Array" , reducedArr);
content_copyCOPY