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
I like this solution with the in operator.
Why did I not think of this? So nice!
Both are getting there values from 'arr'. You can imagine this as nested loops. .find on the outside, .filter on the inside.
Very nice use of an array for the initial value. I want to do this for another solution now.
This comment is hidden because it contains spoiler information about the solution
Here's what ChatGPT told me about this code.
"Overall, it's unclear what the purpose of this code is or what it is intended to accomplish, as it contains a lot of obfuscated and seemingly arbitrary variable and function names, as well as mathematical calculations that don't seem to have any clear meaning or utility."
I did not know the argument object existed on all non-arrow functions. Beginner kata was worth doing.
Omg, I tried to figure out the algorithm behind Math.random() when the solution was so simple haha
This comment is hidden because it contains spoiler information about the solution
Very satisfiying once you solve it. I finally solved something with recursion and it was this problem :)
Logical OR operator is used as control flow instead of a conditional in this instance.
It returns the first truthy expression. If every expression were to be false, it returns the final falsy value.
You can imagine it as a door. You only need to open the door ||, to look for another truthy value.
Solved the short tests, but for the long test I get the error "Execution Timed Out (12000 ms)", my best guess is I would need to learn bitwise operators to make this more effienct?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...