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.
Concise and clear!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Nice! Is this destructuring? Way neater than trying to keep track of indexes.
This comment is hidden because it contains spoiler information about the solution
I came to say the same; better have one more variable for readability. Also, adding a comment to say why they're subtracting 96 would help for future maintenance. I agree its a nice solution.
This comment is hidden because it contains spoiler information about the solution
This is a question of best practice. In my solution, I have two return statements in my function. The first checks the length and returns false if length is not 10, the other return statement checks if we finish at our starting position. Should I do the check for length and position in one return statement like I've seen in many solutions? It seems to me having that short-circuit check before I apply any other logic saves on computational work (however miniscule). Should I write functions with only return statement as general best practice?
This comment is hidden because it contains spoiler information about the solution
Ah -- good point. I assume with these exercises that we'll get valid input (some exercises say to assume so). However, getting in the habit now would be wise. Thanks!
This comment is hidden because it contains spoiler information about the solution