title: Nested forEach: Uncaught TypeError: data.forEach is not a function
body: <p>I don't want to use any for loop or any of the regular loops, I am trying to use a <code>forEach</code> but I am getting an error</p>
  
  <blockquote>
    <p>Uncaught TypeError: data.forEach is not a function</p>
  </blockquote>
  
  <pre><code>return falsyData.map(function(data) {
    data.forEach(function(key) {
      if (key.match(reg)) {
        return key;
      }
    });
  });
  </code></pre>
  
  <p>but if I do it this way it works:</p>
  
  <pre><code>return falsyData.map(function(data) {
    for (var key in data) {
      if (key.match(reg)) {
        return key;
      }
    }
  });
  </code></pre>
  
  <p>why ?</p>