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.
Nice!
SO SIMPLE - - - - - I ADMIRE YOU
Now i realized, how dumb i am.
I salute You!
This comment is hidden because it contains spoiler information about the solution
original
Just simple as it should be!
This kata is pretty fun, and I like the practical solution to it. Good job and happy coding!
ditto
Cool
It could, but it won't throw an error, JavaScript doesn't care.
x/0 = Infinity
and0/0 = NaN
.Couldn't this potentially cause issues if mpg is 0?
this ones cool
It checks the condition if "distanceToPump/mpg" is 'smaller or equal' to "fuelLeft". The "return" returns true (if success) and false (if not).
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators#Less_than_or_equal_operator
Loading more items...