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 unlike addition, multiplication converts string to number before multiplying e.g. '2' * '3' = 6
brilliant!
other operators ?
This comment is hidden because it contains spoiler information about the solution
Sneaky way to ensure the response is a boolean, instead of null.
why these !! ?
because you already handled the two first years
for wich firstYear=15 + secondYear=9 = 24 (for every kind)
and for the rest of the years their alike (5 or 4 each year) depends on animal
so you just add 24 to (5 or 4) * years - 2
This comment is hidden because it contains spoiler information about the solution
A negative zero doesn't make mathematical sense. Normally zero has no sign whatsoever. It is neither negative nor positive. That is why most programming languages also don't have negative zeros.
There are however a few programming languages that do have negative zeros in some cases. But they are more the exception.
I am sure google can tell you more about it.
The kata description also says this:
This comment is hidden because it contains spoiler information about the solution