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.
tests not working at least in js
Thanks for the feedback. Please try again, it should work now.
This comment is hidden because it contains spoiler information about the solution
Your tests are messed up, at least in coffeescript. Initial tests tell that identical arrays are not the same, random tests use 3D arrays for some reason.
Random tests are incorrect for some inputs in coffeescript! For exaple: Testing for nbMonths(2500 ,2500 ,1000 ,1.5) - It should work for random inputs too - Expected: [1,1000], instead got: [0,0]. It should expect [0,0]. Thanks!
Thanks a bundle - it works now!
Your tests in coffeescript give the following error - ReferenceError: pad is not defined. It looks like a problem on your end.
This comment is hidden because it contains spoiler information about the solution
Things like that you should propose as friendly suggestions rather than marking them as issues. But thanks anyways, I've switched to assertEquals.
I'm glad you liked it.
The tests are passable, but provide poor feedback in terms of what's wrong if anything. It's not a very good kata the way it's written.
I think this kata is broken. Tests output has nothing to do with the solution code.
I think you're on the right track. Also, note that codewars' console interprets and prints certain things (like nulls etc) in a funny way, i.e. it doesn't print them. BTW, an empty array is not a sparse array.
I'm not sure you want me to tell you the answer - I think it spoils the fun of figuring out what the heck is going on. It is the whole point for katas like this. As a way of nudging in the right direction, remember than arrays in JS are objects.
I think the clue is in the description. Sorry if it looks cryptic.
Loading more items...