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.
LOL
What about it? The answer is undefined, and JS will give some answer ( either
NaN
or positive or negativeInfinity
, because of IEEE.754 ).There is no need to special case it.
What would you do about it?
How about y = 0 ?
this is needed to return the accumulator result after each iteration
Don't change the order.
Hello
The duplicates are removed, but the arrays are not sequence equals.
Is it intentional?
Expected: [4, 6, 3], instead got: [3, 4, 6]
Expected: [4, 5, 2, 1], instead got: [1, 4, 5, 2]
Expected: [2, 1, 3], instead got: [1, 2, 3]
smart solution!
Thanks for this Kata series!