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 think I've read something before that javascript sets aren't true or something along those lines and .has should be on average (but not all the time) faster that includes
Please read this first: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution
And then the error message:
You have an infinite loop in your code (check that exact input in your IDE). Not a kata issue.
This comment is hidden because it contains spoiler information about the solution
I could never imagine travelling 50km for a tank of gas but I also couldnt imagine travelling 50m even more. I think the distance's measurement should be made clear in the description.
That's the case for most katas. If your function isn't pure, such errors are to be expected.
yeah I used the debugger and noticed this. I understand the difference but still feel a bit cheated because the breif doesnt state the test was gonna be run all in one instance. It merely wants me to solve for number.
You are using a global variable:
correct_number
, which would just accumulate the data from last function call.You should put the declaration inside the function body to store only relevent stuff.
This comment is hidden because it contains spoiler information about the solution