Answers for "const justCoolStuff = (arr1, arr2) => arr1.filter(item => arr2.includes(item));"

-1

const justCoolStuff = (arr1, arr2) => arr1.filter(item => arr2.includes(item));

**compare two arrays and return a new array with only items present in both arrays:
const justCoolStuff = (arr1, arr2) => arr1.filter(item => arr2.includes(item));
Posted by: Guest on March-05-2021

Code answers related to "const justCoolStuff = (arr1, arr2) => arr1.filter(item => arr2.includes(item));"

Code answers related to "Javascript"

Browse Popular Code Answers by Language