title: How comes that function gets elements without parameters?
body: <p>I would like to understand why my console.log outputs the elements which have been placed before <code>some()</code>.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function isBiggerThan10(element, index, array) {
      console.log(element);
    return element &gt; 10;
  }
  
  [2, 5, 8, 1, 4].some(isBiggerThan10);</code></pre>
  </div>
  </div>
  </p>
  <p>From my understanding, the elements should be outputted if they are given as parameters of <code>isBiggerThan10()</code>. I guess this is because of the array function <code>some()</code>. If so, how can I write a similar code like what <code>some()</code> does? The goal is to output all elements of the array in the function myElements(). myElements should be a parameter of the function test().</p>
  <p>This is what I have tried:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>Array.prototype.test = function(i) {
      console.log(i);
  };
  
  function myElements(element) {
      console.log(element);
  }
  
  [2, 5, 8, 1, 4].test(myElements);</code></pre>
  </div>
  </div>
  </p>
  <p>But it seems like that I don't understand the logic behind of it.</p>