re: Project Euler #6 - Sum Square Difference VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Javascript ! const sumSquareDifference = (n) => { const numbers = [...Array(n + 1).keys()]; const sumOfSquares = numbers.reduce((accumula...
 

Yours is good. But I have a feeling it uses more then one for/for each loop. May explain why it is a bit slower then mine. Not sure.

 

Yeah, also the fact that I'm iterating 2 times the same array !

code of conduct - report abuse