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.
Same here lol I am digging through the comments to find out
2nd fail test said that, there instead of array [0,0] function have to be []
You should check first if the input is null before checking is length
This comment is hidden because it contains spoiler information about the solution
I believe that test case expected an empty array to be returned, whereas here that'd be [0, 0], no?
I'll double-check though, I've realized my accepted solution is suspicious anyway.
Where do you think it should fail?
nice
Ahh yeah my mistake i didn see right now i understad it , i thoght we need the sum of positiv and negativ.
Thank you for your time.
Because it's count of positives, not sum of positives.
This comment is hidden because it contains spoiler information about the solution
I love the way you used to for loop!
why is that ?
the editor didn't let me use input.length for some reason.
This comment is hidden because it contains spoiler information about the solution
Using the for loop to get both the positive variable and the += for the negative variable in a single loop is clever. Well done.
Loading more items...