title: How to calculate intersection of multiple arrays in JavaScript? And what does [equals: function] mean?
body: <p>I am aware of <a href="https://stackoverflow.com/questions/1885557/simplest-code-for-array-intersection-in-javascript" title="Simplest Code for Array Intersection">this question, simplest code for array intersection</a> but all the solutions presume the number of arrays is two, which cannot be certain in my case.</p>
  
  <p>I have divs on a page with data that contains arrays. I want to find the values common to all arrays. I do not know how many divs/arrays I will have in advance. What is the best way to calculate values common to all arrays? </p>
  
  <pre><code>var array1 = ["Lorem", "ipsum", "dolor"];
  var array2 = ["Lorem", "ipsum", "quick", "brown", "foo"];
  var array3 = ["Jumps", "Over", "Lazy", "Lorem"];
  var array4 = [1337, 420, 666, "Lorem"];
  //Result should be ["Lorem"];
  </code></pre>
  
  <p>I found another solution elsewhere, using Underscore.js.</p>
  
  <pre><code>var arrayOfArrays = [[4234, 2323, 43], [1323, 43, 1313], [23, 34, 43]];
  _.intersection.apply(_, arrayOfArrays)
  //Result is [43]
  </code></pre>
  
  <p>I've tested this with simple dummy data at my end and it seems to work. But for some reason, some of the arrays I'm producing, which contain simple strings, also automatically include an added value, "equals: function":</p>
  
  <pre><code>["Dummy1", "Dummy2", "Dummy3", equals: function]
  </code></pre>
  
  <p>And whenever I use the Underscore.js intersection method, on an array of arrays, I always get [equals: function] in dev tools, and not - if "Dummy3" is common to all arrays - ["Dummy3"].</p>
  
  <p>So TL;DR is there another solution to array intersection that would suit my case? And can anyone explain what [equals: function] means here? When I expand the item in the dev tools, it produces an empty array and a list of methods available on arrays (pop, push, shift etc), but these methods are all faded out, while equals: function is highlighted. </p>