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 glad someone adds "var" or "let".
Is it an actual best practice?
By adding a method directly into a constructor, the method is copied every time you create a new instance.
That's why it's better to add it using
Ship.prototype.isWorthIt = function(){}
outside the constructor, or by using ES6 classes.
Great!thx!
Great explanation, thank you!
This comment is hidden because it contains spoiler information about the solution
Same in the javascript version.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Thanks for the feedback, the description has been updated.
It was not directly clear for me that floats need to be returned as NaN.
Only after the provided test with a float failed I noticed that I need to return NaN.