DEV Community

Discussion on: What s wrong with Array.reduce ?

Collapse
 
pengeszikra profile image
Peter Vivo
let max = Math.max(...[5, 10, 7, -1, 2, -8, -12])
Thread Thread
 
wulymammoth profile image
David

Yeap! Just re-using the maximum example that others have used for illustration purposes only. JS already has this available in the standard library :)