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
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
ha ha, my decision was not accepted only because i moved "use strict" from the function to the first line of code, and the tests gave out all sorts of nonsense. But as soon as i returned "use strict" back inside the function, my decision immediately became correct) Funny kata(no).
There is no issue. In both cases you should return an empty array. The description only states what to do if you get an empty array as input, then you should always return an array without a single element, and with an array with only one element the answer is an empty array too.
the description states - "if you get an empty array/list, return an empty array/list", but test case 2 states - "return [] if the list has only one element". So it looks like there is an error in the description, since an empty array is not the same as an array with 1 element.
My solution passes and it hasn't assignment.
thank you, your comment broke my wall of misunderstanding
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Can someone help me figure out what's wrong with my JS code? I can't understand why I am constantly getting an error - "f is not defined", I declared f inside the function, but something is clearly wrong. I will leave my code under the spoiler in the responses to this comment.
Yes, thank you very much, everything is working well now. No matter how much I looked, I couldn't notice that I missed "+=")
Loading more items...