loading...

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

FULL DISCUSSION
 

Using ES10 Array.flat() to flatten array

const sumArray = x => x.flat(Infinity).reduce((a, b) => a + b, 0)
 

ES10 is where it's at! Love this solution!

code of conduct - report abuse