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.
Thanks for the question!
At the time I was doing this problem, I had challenges using ternary operators in general. So I tried my best, each time a solution required an if/else statement (as above), to refactor it and write it using a ternary operator.
I suppose the better way would have ben to submit the first function and then also submit the second solution...but I wanted them side-by-side (at least for this problem) to help me understand ternary operators a bit better.