loading...

re: What’s your alternative solution? Challenge #15 VIEW POST

FULL DISCUSSION
 
const numbers = [-2, 33, 12, -6, -10, 25];

const maxNumber = numbers.reduce((max, num) => {
    if(num > max) max = num;

    return max
}, 0)

console.log(maxNumber) // 33
code of conduct - report abuse