title: Removing zero values from an array of objects
body: <p><strong>Problem</strong></p>
  
  <p>I'm pushing values from my JavaScript functions and filling an array with objects.
  what I would like to happen is remove key + Value pairs that are zero.</p>
  
  <p>example of return array</p>
  
  <pre><code>[Object percent: 516 unit: -10.689124404913258
   Object percent: 516  unit: -9.011227255423254
   Object percent: 561  unit: -12.669770888525518
   Object percent: 6516 unit: -15.99180968320506 
   Object percent: 0  unit: 0] 
  </code></pre>
  
  <p><strong>JavaScript</strong> </p>
  
  <pre><code>my_arr = []
  
    for(var i = my_arr.length - 1; i &gt;= 0; i--) {
      if(array[i] === 0) {
         array.splice(i, 1);
      }
     return my_arr;
  }
  </code></pre>