0

Why can't the reduce method be used next to the arguments object? in javascriptenter code here

function sum() {
    let h = arguments
    return  h.reduce((a,b)=>a+b)
}




console.log(sum(2,45,6,6,72))

function sum() {
    let h = Array.from(arguments);
    return  h.reduce((a,b)=>a+b)
}




console.log(sum(2,45,6,6,72))

0 Answers0