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.
l like this solution
I was wondering if there's a way to reference a range with cases. For example, instead of writting case 1: then case 2: and so on, can we write something like case 1 to 3:? Thank you
This comment is hidden because it contains spoiler information about the solution
If you want to change your answer, well, your answer is a already submitted, so just click Train Again and submit another solution. You can have multiple solutions per kata. Or your can fork it, but that is only for small changes.
Hey! I appreciate the feedback. After submitting my solution, I saw some other switch solutions and they had the default case, but I didn't know how to change my final answer. Switch is one I have rarely used and wanted to practice. Gotta remember the default! Thanks again for your comment.
I tried these stacked cases but I got
undefined
on my attempts, I don't know why for now... But I wanna say that you could put a default case for when the user gives you an invalid month so your switch can return an error message. ^^