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.
would you consider pulling the stick out of your ass? :/
Would you consider using better language to express cluelessness next time?
This comment has been reported as abusive
good
and there was me thinking I was clever using array.some()
did the same, and feelt dumb after seeing this variation hahaha
Ohhhhh, really goood
Very smart lol
lol. makes sense.
I personally think that is best use do filter and includes since these are functions that can (and mostlikely will) be otmized by the interpreter/compiler.
What you did is still valid tho, but is better to use Set instead of creating a new array with the element/boolean formant
me pude ahorrar muchas lineas con esta solución
Nice!
Man this is genius! I totally forgot about
.includes()
. I ran a forEach onb
. 😅What would be the optimal solution?
I believe that by using includes, the code will have to check the entirety of b array for each the value of array a, resulting in time complexity of O(n * m)
Loading more items...