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.
|| - old and bad solution, need ?? - best and clever.
I tried it and it failed in two of the test cases (I think where one array was empty and the other was null)
I stand corrected! The !! handles two edge cases where not having it failed. I'll be using this technique thank you.
Actually pretty readable. I'd say this is the clear winner. Even though I think you don't need to do it (a && b &&...) should work fine, I had yet to see that way of converting to a boolean and appreciate it. I can't think of an application right now beyond using the truthyness/falsiness of the original array but maybe there is one?
thats really best practices but its a little hard to read haha!
I like it. But I wonder why converting the arrays to booleans, why not rely on their truthy/falsy properties (return a && b &&...)?
Amazing 😍
cheers 壟
best & clever
You're absolutely clever and you added so much to my knowledge
why are !! required, if they are not present wouldnt they evaluate to true or false either way ?