How can I filter out values from an array using another array as a reference in the filter function?
x = [3,4,5];
y = [4,5];
var result = x.filter(customFilter);
function customFilter(element, index, array){
// code here
});
What is the most effective method to pass the array "y" as the argument for the "arrayReference" parameter in the function?