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.
I see. Thank you.
Sergio, this returns true when divisors x and y leave the same remainder, right?
e.g. (11 % 2) == (11 % 5) // (1 == 1) true
but 11 is divisible by neither 2 nor 5, and should return false.
Oh thanks i didn't even think about it as unsafe. Just learned it from 'reverse string challenge' with limited characters. And this kumite is honestly, but a test. Was wondering what is this, found out after submitting. I'll find a way to delete it, i guess.
You basically defined a function without any declaration. I feel like you should know the many dangers involved with that practice. Check out this link for more information.
https://www.sololearn.com/Discuss/2191625/javascript-arrow-functions-with-and-without-const
Wanted to extend the idea of using default parameters. I wish I could keep the spread operator, but it must be the last, and default params are set left to right.
It's a simple solution - but it goes over the numbers twice, once for max and once for min.
You can speed this up by calculating both min and max in one pass only.
Wish I could mark this answer as both Clever and Best Practices - because it's definitely the best answer!