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.
Sure,
Filter iterates over each value (v) and creates a new Array containing only the values that when passed into the supplied function return true.
The function I've used returns Array.includes which tests whether the value is present in an array and returns true or false.
What might seem confusing is the ! operator which negates a value (turns true to false and false to true).
So I've basically written: arr1 filter the values that are NOT included in arr2.
I've used the same on arr2 and then joined them together using concat.
Hope that makes some sense.
tbh. I'm not even sure this is a valid solution. It doesn't work in some cases, even though it passes all the current tests.