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 might shed some light
If it doesn't pass the tests, it doesn't return the right answer. No way it can be different: that's what tests do: compare your output with the expected one and display the corresponding message if they don't match.
Use markdown tags to format your code or it's not usable. Refer to the documentation about this and more: https://docs.codewars.com/training/troubleshooting/#post-discourse
The code you provide is incorrect, it throws a SyntaxError.
I strongly advice you to read carefully this: https://docs.codewars.com/training/troubleshooting/
This comment is hidden because it contains spoiler information about the solution
You don't test the right input.
There is an error in one of the random tests for JavaScript.
It reads:
expected '0:00:01' to equal '00:00:01'"
even though my output is definitely
'00:00:01'
Here's the console.log for my two cases:
Remove those calls to your function at the end of your code, that's what's being detected as recursion, not set or repeat.
I am not understanding why using Set and .repeat are both considered using recursion. If I don't understand what makes these recursive, I won't be able to find a method of solving this kata
The index should be in the range [0..length-1]. If it is not, GetNth() should throw/raise an exception
Thank you for asking this great question!
And thank y'all for the responses!
Your code is filtering the mutated list instead of the original one, that's why you get the wrong order.
This comment is hidden because it contains spoiler information about the solution
Node 14 should be enabled and
chai
should be used for assertions.Loading more items...