title: How not to count array.push(undefined) with array.forEach(_ => count++)?
body: <p>My goal is to push actual <code>undefined</code> to an Array, similar to <code>new Array()</code>. Right now, if you use <code>array.push(undefined)</code> and count it with <code>array.forEach(element =&gt; count++)</code> it is still counted as element.</p>
  <pre><code>function test() {
    let object = [5,,,5,&quot;hoomba&quot;]
    object.push(undefined)
    let maxRetries = 0;
    object.forEach(element =&gt; maxRetries++);
  
    console.log(object);
    console.log(maxRetries);
  }
  
  test();
  </code></pre>
  <p>Expected result:</p>
  <pre><code>console.log(object) // [5, undefined, undefined, 5, &quot;hoomba&quot;, undefined]
  console.log(maxRetries) // 3
  </code></pre>
  <p>Actual result:</p>
  <pre><code>console.log(object) // [5, undefined, undefined, 5, &quot;hoomba&quot;, undefined]
  console.log(maxRetries) // 4
  </code></pre>