title: How to filter array values greater than x
body: <p>I've been looking around on the internet and I cant find any posts that cover how to fix this even though I am certain it is a very simple fix.</p>
  
  <p>Basically I have an array with number values in it and I want to filter out any numbers that are greater than 10 and add them into another array. Here's what I have so far but what I am getting is all of the numbers from the first array.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;body&gt;
    &lt;p id="demo"&gt;&lt;/p&gt;
    &lt;button type="button" onclick="alert(output)"&gt;Click Me!&lt;/button&gt;
    &lt;script&gt;
      var input = new Array(9,3,4.3,24,54,8,19,23,46,87,3.14);
      var output = new Array();
      var length = 1;
      for (var i = 0; i &lt; input.length; i += length) {
        output.push(input.slice(i, i + length).join(" "));
      }
    &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>