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.
I'm having the same problem, the random tests are off by one
Yes thanks you are right I see
This is very inefficient and unnecessary (I did the same when I solved this kata at first!), look at other solutions.
But the task is to check all the elements of the array, right?
Wouldn't this re-run arr.filter(e => e === 1).length for every iteration?
Edit - not sure what's going on there, but you shouldn't have to make sure that the array is all the same. I just use localCompare.
This was more challening than I thought at first.
One thing I don't understand: Why does the original array have to be shallow copied to preserve the order of items that have equal last characters?
OK, I assume it was just a random glitch.
I managed to pass it after "attempting" several times.
Should the last donation be a non positive number (<= 0) John wants us to throw (or raise) an error
~ but your code does not handle this requirement@pr0ace1, you must use the spoiler tag if you post code (I have added the tag) otherwise eveyone can see it.
This comment is hidden because it contains spoiler information about the solution
Thanks sflicker- I am also getting 'errorExpected' fails when I test my code. Is there any way to see what the errors are? As I can't seem to expand it!
Often print()/console.log() the input works. You may need to click (expand) on the arrow in test case on the output to see this.
hi, my code failed a numebr of tests, but I a unable to see what the failed tests (or the inputs of these failed tests) are. Is there any way for me to see this? Thanks
throw an error in JS
Loading more items...