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.
Because at the time i wrote the code i was 6th kyu and then 5th kyu katas were worth more to me
Now being 4th they are not worth much to me ...
i don't really care - happy that i was not crazy or stupid and was missing something trivial
It runs now. I am glad my code was good but by now the solution is worth measly 2% instead of original 15% or so...
Neither do i. Could you try running my code as if it's another of your solutions and see if it passes?
Thank you for your advise to avoind arrays. i will see about that. But since in all tests my function returns the right result and the tests say expected NaN, that can't have anything to do with my code, can it? If my code got overflow it would not return right results time after time...
PS.
I can hardly imagine this line produce an error. this is is basic at it gets.
Here is a screen shot: http://tinypic.com/m/jhc0at/3
This comment is hidden because it contains spoiler information about the solution
Once again, i believe there is something wrong with the test (at least for JS)
Here is the output:
Time: 366ms Passed: 8 Failed: 50 <- ALL Basic tests pass, And ALL random tests fail !? Always! Weird!
Test Results:
Basic tests
Completed in 10ms
Random numbers
Log
Input n=1 <-- just to make sure i log input. it is something which value is 1, not a string "1". Just to make sure i have a guard to test for int
✘ It should work for random inputs too - Expected: NaN, instead got: 8
How could the result of 1 be NaN. All other random test say exactly the same:
Input is a number but expected result is NaN.
What's the deal here. Even if the tests are right and i missing something, i really want to know...
This comment is hidden because it contains spoiler information about the solution
I got your reply about the other kata and admit my ignorance and acknowledge respect for your skills and creativity :)
The problem is that it's hard to correct my incorrect code without knowing the test input.
Have the same issues as others, all my exammple test are fine but all the random ones fail...
This is second kata by the same author that produces strange test results
This comment is hidden because it contains spoiler information about the solution