Answers for "js arrays check if there is intersection"

1

js arrays check if there is intersection

// Use a combination of Array.prototype.filter and Array.prototype.includes:
const filteredArray = array1.filter(value => array2.includes(value));
Posted by: Guest on August-27-2021

Code answers related to "js arrays check if there is intersection"

Code answers related to "Javascript"

Browse Popular Code Answers by Language