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.
Oh no, poisoned by OOP
Check out my other solution for even more condensed madness!
For future reference, fat arrow notation could really help make your code concise.
Example:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions
Yeah, I've learned a lot (level now 5kyu lmao). Going to resolve.
You should feel good! You finished a 4 kyu kata! Well done, expertise comes with time!
It's more simple to use the reverse() function of array
Because Math.floor(num) rounds num down to the nearest whole integer regardless of the decimal value.
Math.ceiling(num) does the opposite; it rounds num up if it's not a whole integer.
Math.round(num) decides whether to use floor or ceiling. Think of it as an if/else statement that rounds it up if the decimal is ≥ 0.5 and rounds it down else.