title: What are comma separated objects in Javascript?
body: <p>Now I notice one thing, which is weird to me and I cannot find proper documentation. When I get the documents from collection with Mongoose.find() I log them to console. What's written is:</p>
  
  <pre><code>{ 
     name: 'first document'
  },{
     name: 'second document'
  }
  </code></pre>
  
  <p>(Of course they have _id's, but this is for the sake of simplicity.)</p>
  
  <p>What is this in Javascript? I mean, I tried to do .forEach on it, but I get:</p>
  
  <pre><code>TypeError: undefined is not a function
      at Array.forEach (native)
      ...
  </code></pre>
  
  <p>but, I can normally do something like:</p>
  
  <pre><code>User.find({}, function (err, users){
  //        users.forEach(console.log('iterated')); -&gt; returns error that I've described
  
      for(var i=0; i&lt;users.length; i++){
          console.log('iterated');
      }
      console.log('users' + users);
  });
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>The type error is because of not passing function to <code>forEach</code> method, as mentioned in comments. But why is it not returning something like:</p>
  
  <pre><code>[{ 
     name: 'first document'
  },{
     name: 'second document'
  }}
  </code></pre>