count empty values in array
<p>Given an array:</p>

<pre><code>var arr = [1,,2,5,6,,4,5,6,,];
</code></pre>

<p>Count how many <strong>empty</strong> values is has: (length - length after removing the empty values)</p>

<pre><code>var empties = arr.length - arr.filter(function(x){ return true }).length;

// return 3
</code></pre>

<p>or something like this</p>

<pre><code>arr.empties = arr.length;
arr.forEach(function(x){ arr.empties--  });

// arr.empties returns 3
</code></pre>

<p>Is this the best way or am I missing something?</p>
