Javascript:

const squareSum = numbers => numbers.map(num => num ** 2).reduce((a, b) => a + b, 0)

you can actually get rid of the map

map

const squareSum = arrayOfNumbers => arrayOfNumbers.reduce( (acc, val) => val ** 2 + acc, 0 )

Trying to find a more... unconventional javascript answer :D

function squareSum(numbers) { if(numbers.length > 0) { let n = numbers.pop(); return square(n) + squareSum(numbers); } return 0; } let squares = [0, 1]; function square(n) { let absn = Math.abs(n); if(typeof(squares[n]) !== 'undefined') { return squares[n]; } let sqr = square(absn-1) + (absn-1) + absn; squares[n] = sqr; return sqr; }

We're a place where coders share, stay up-to-date and grow their careers.

We strive for transparency and don't collect excess data.

## re: Daily Challenge #225 - Square'n'Sum VIEW POST

FULL DISCUSSIONJavascript:

you can actually get rid of the

`map`

Trying to find a more... unconventional javascript answer :D