title: How to remove certain number elements from an array in javascript
body: <pre><code>var numbers = [1,2,0,3,0,4,0,5];
  </code></pre>
  
  <p>If I have the above array and I want to remove the 0s and output an array of [1,2,3,4,5] how would I do it?</p>
  
  <p>I have the below code but I am getting an "TypeError: arr.includes is not a function" error...</p>
  
  <pre><code>var zero = 0;
  
  var x = balDiffs.map(function(arr, i) {
    console.log(arr);
    if(arr.includes(zero)) {
      return i;
    }
  });
  </code></pre>