Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Had to lookup what was going on here.. Here's what I found!
This function, squareSum, takes an array of numbers as input and returns the sum of the squares of each number in the array. Here's how it works:
The reduce method takes two arguments: a callback function and an initial value. The callback function takes two arguments: an accumulator (in this case, the running sum) and the current element in the array being processed.
In this function, the callback function squares the current element (n) using the * operator and adds it to the running sum (sum). The result of this operation becomes the new value of sum, and the process repeats for each element in the array.
Finally, when all elements in the array have been processed, the final value of sum is returned by the reduce method as the result of the function.
Gret job!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Great job!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...