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.
Fixed.
this is easier than i first thought :)
This comment is hidden because it contains spoiler information about the solution
The general structure of a Codewars problem is that the tests call your function with dfferent inputs and check that it returns the correct value.
This is for consistency (it would be bad UX if some Kata expected you to write to console, and others expected you to return a value, etc. The reason for this being the chosen format is that most langauges unit-testing libraries are structured like this, making test writing for most of them easier.
Read the instructions carefully, it says return, not print
Nice cata. Simply and pretty short on JS. Also remmeber me to use ternary)
Thanks, you comment helps me understand what i miss)