title: How to pass variable value to .filter()
body: <p>The following code is taken from the reference <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter" rel="nofollow noreferrer">here</a>:     </p>
  
  <pre><code>function isBigEnough(value) {
        return value &gt;= 10;
      }
  
      var filtered = [12, 5, 8, 130, 44].filter(isBigEnough);
      // filtered is [12, 130, 44]
  </code></pre>
  
  <p>I want to know if I can dynamically change the value of <code>10</code> in the <code>return</code> line by passing in a variable. From the reference I cannot figure out how to do this. I want to call the same filter callback but pass in a unique value for a regex test.</p>
  
  <p>So it would look something like:</p>
  
  <pre><code>function isBigEnough(value, num) {
        return value &gt;= num;
      }
  </code></pre>