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.
This comment is hidden because it contains spoiler information about the solution
nice solution
This comment is hidden because it contains spoiler information about the solution
Thanks for taking the time to clarify, appreciated.
nope
Your points are not included in the array of your class's points. For calculating the average point you may add your point to the given array!
the second parameter of reduce is optional, in that exercise we dont need it the code works still without 0
i think no need cause they said the given array contains the scores of the class and you are one of them so it is already included in the array
the value of a, because the reduce method does a loop on a given array and accepts 3 arguments (accumulator, element, index), and in the reduce method you have to assign the initial value of the accumulator like he did.
I made an empty array to add to because of that thought. I think this works because we are using return which just shows the results of the split.
was just testing it out, totally expected a gazillion number of errors and boom it worked
very smart
indeed it's no need to add your points to class points to compare with average. so tricky~! ))))
This comment is hidden because it contains spoiler information about the solution
It is nice but tricky. I guess the correct average value does not matter in this case.
That's why it works without adding yourPoints to classPoints.
"you MAY add your point to the given array!"
i have the same q, maybe it is because the default method of reduce
Loading more items...