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.
The tests don't tell us anything about where the error is.
Why Object.assign(this, {firstName}) is used here instead of this.firstName=firstName? I haven't seen this method mentioned in a JavaScript book.
upd: copies into an object... Genius!
Nice Kata!
Thank you. I didn't know that array prototype can be extended with custom methods. That's what confused me.
What I meant was that I haven't seen a method called "remove_", but I know that there are methods that remove values from an array.
Does Array.prototype have a remove_ method in JS?
This comment is hidden because it contains spoiler information about the solution
The reduce method is well suited for stacking array elements with each other.
A good solution. However, if you count large and very large values, then the processor may freeze.