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.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
It's so obvoius what you did, I used a do while loop but this is much smoother :)
Lol I'm just realizing how mildly convoluted my answer was. This is certainly best practice right here solid answer
This comment is hidden because it contains spoiler information about the solution
Please explain what kind of math is behind this solution?
This comment is hidden because it contains spoiler information about the solution
Such a cool solution , I am still a begginer , can someone please explain it to me ?
Because of the array zero based indexing.
Nice, short solution! However could someone clarify why n-1?
Nice
Love the reusability of this. Very practical.
You could either see it as future proofing in case someone decides to increase the array but forget to update the return statement, or see it as over-engineering since "phrases.length" will always be 6.
Either way, cool solution.
Why using phrases.length since it's always equal 6 ?
However great way of solving the %6=0 problem.
Great solution. Upvoted!