You might want to consider using Array.prototype.some. This will run a function against each element in an array, until something returns truthy. Then, it immediately stops and returns true. This will help a lot if you have a large number of items in the second array. developer.mozilla.org/en-US/docs/W...
You might want to consider using Array.prototype.some. This will run a function against each element in an array, until something returns truthy. Then, it immediately stops and returns true. This will help a lot if you have a large number of items in the second array.
developer.mozilla.org/en-US/docs/W...
Oh yeah totally forgot about that little guy. Thanks for mentioning! Will definitely use it next time similar needs come up!