Skip to content
Advertisement

Tag: intersection

Javascript Get the common elements of three arrays

I am trying to filter the common elements of 3 arrays. But instead of getting the common elements of 3 arrays, it only reads the 2 arrays and not the 3rd array. Here is my code, thank you: Answer As mentioned by @Titus, the issue in your code is the double return statements – once the first return is found

Advertisement