While working on a task involving this function, I noticed that it is not returning the values as expected.
function intersection(arrays) {
return arrays;
}
console.log(intersection([5, 10, 15, 20],[15, 88, 1, 5, 7],[1, 10, 15, 5, 20]));
OUTPUT
[5, 10, 15, 20]
I am curious about how to access all sub-arrays of a main array within this function.