Implement a function squareSum
so that it squares any number(s) passed into it and then adds the squares together.
For example, for [1, 2, 2]: it should return 9 because 1^2 + 2^2 + 2^2 = 9.
Tests
[1, 2, 3, 4]
[0, 3, 5, 7]
[2, 2, 20]
Good luck!
This challenge comes from jhoffner on CodeWars. Thank you to CodeWars, who has licensed redistribution of this challenge under the 2-Clause BSD License!
Want to propose a challenge idea for a future post? Email yo+challenge@dev.to with your suggestions!