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.
That's not an imporvement IMO. Best practices says to do what you suggest to ensure that it strongly equates or does not equate to that.
https://stackoverflow.com/questions/359494/which-equals-operator-vs-should-be-used-in-javascript-comparisons
Thanks, haven't thought about that.
francis.lemay, please use spoiler flag next time, your posts here are visible in the homepage for people that haven't solved the kata yet.
This comment is hidden because it contains spoiler information about the solution
Your solution has more lines than the others, but I think it's more readable this way. We can read aloud the logic.
This comment is hidden because it contains spoiler information about the solution
Only improvement possible: use
!==
instead of!=
as both arguments are numbers.