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.
e=>e can be replaced with Boolean
Sometimes I am just wondering, how beautiful JavaScript is - and how many clever people are there. And at the same time, I am also happy that I do not have to maintain this kind of codes :D Hope you do not use this kind in production! Anyway, hats off for this math/algo skills :)
The function should not return
{}
for invalid inputs, otherwise the output for valid/invalid inputs is indistinguishable.Fixed tests are too weak. At least tests with booleans, non-empty arrays, objects having arrays/empty strings/
0
's as values should be added.No random tests.
Excuse me but who upvotes this as a best practice :D