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.
Instead of using null in
Math.min.apply(null, numbers)
, useMath
like so:Math.min.apply(Math, numbers)
. This allows the apply function to use the Math scope (whenever it needs to). Just a best practice bonus, other than that very clean code!splice
is incorrect. Becausesplice
will mutate numbersYou should keep trying, I was about to quit cause thought the tests were wrong but it was my code.
See my post. I agree: totally an issue with the tests.
The random tests are incorrect. All of them. The first argument passed to the deleteNth function should be an array and the second argument should be a number. I actually cannot find a single random test that is passing the correct arguments.
Example:
Testing for delete_nth([17, 33, 1, 47, 33, 47, 17, 33, 17, 17, 17, 47, 47, 13, 17, 33,2)
There should be a second bracket following the (last) 32.
ALSO:
The tests run delete_nth and not deleteNth!