Solving For The Max Value In An Array
Ayo Alfonso
228

But in a real world example this is much more clean.

const largest = list.reduce((acc, n) => {
 if(n > acc) return n;
 return acc;
}, -Infinity)

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.