title: Why does the forEach() method exist for object keys but not array keys?
body: <p>If I do this in node (v10.15.3):</p>
  
  <pre><code>Object.keys({test: 'test'}).forEach(() =&gt; console.log('gfg'));
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>gfg
  </code></pre>
  
  <p>If I do:</p>
  
  <pre><code>Array(3).keys()
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>Object [Array Iterator] {}
  </code></pre>
  
  <p>So I clearly have a type that is in some sense iterable.</p>
  
  <p>However, </p>
  
  <pre><code>Array(3).keys().forEach(() =&gt; console.log('gfg'));
  </code></pre>
  
  <p>'Yields':</p>
  
  <pre><code>TypeError: Array(...).keys(...).forEach is not a function
  </code></pre>
  
  <p>Why does the forEach function not exist on this iterable object when the keys are derived from an array?</p>