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.
thnx for the feedback, Chrono!
i finally figured out what it was that...
because of your "js test" suggestion.
Nevermind, I read the code wrong and thought the user could mutate it before expected value was calculated.
Yes it is a bad practice, but sometimes that makes the tests vulnerable to cheating solutions (not in this case).
Why is it a problem? I thought it is bad practice to mutate the input.
I will modify by calculating the reference solution before testing.
Print the input value too, but afaik the kata tests are ok. The first one is the value your function returned and the second one the value it should have returned.
...
Done, thanks.
Change the js testing to show the arrays on error message (currently it only does that for small arrays only):
Hello! Thanks for "perfomance" kata!
Random tests
expected [ Array(17) ] to deeply equal [ Array(17) ]
for this test the "if" statment returns "ls" as is...
but its don't match, what a heck
thanks. passed
Your code is printing the result instead of returning it.
sumOfDifferences([1, 2, 10] Log 9
Expected: 9, instead got: undefined
sumOfDifferences([-3, -2, -1]) Log 2
Expected: 2, instead got: undefined