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.
Lol when I wrote my code, I was like somebody going to find a cool way to do this even though it's not hard. Great solution!
As a lover of ternary operators, I love it.
Understandable about readability but super cool.
I like reading the ternaries with the
:
as elses (else ifs) and the?
as like returns.This may be clear to lots of people, but I'd drop this for extra perspective incase someone is new or not as comfortable with ternaries.
Happy Coding!
This comment is hidden because it contains spoiler information about the solution