title: pushing values to array nodejs
body: <p>I need to display all events of user from his calendars. I get a list of all calendars and then loop through each one get events and try to store them in an array. </p>
  
  <pre><code>app.get('/getEventsList/', function (req, res) {
  newArray = [];
  function Done(){
  console.log(newArray);
  }
  
  function getEventsforOneCalendar(token,calid){
  gcal(token).events.list(calid, function(err, eventsList) {
              newArray.push(eventsList);
               });
  }
  function getEventsList(token) {
  
      gcal(token).calendarList.list(function (err, calendarList) {
          if (err) {
       //handle error
          } else {
              calendars = calendarList.items;
              forEach(calendars, function (item, index) {
             getEventsforOneCalendar(token,item.id); 
          }, Done);
  
          }
      });
  }
  getEventsList('xxxxxxxxxxxtoken');
  </code></pre>
  
  <p>});</p>
  
  <p>Problem is: that line
       newArray.push(eventsList);</p>
  
  <p>Any value even static passed in this line doesn't go like 
       newArray.push('test');
  and no error is thrown. if I log it I see it in the console, but it's never added to the array.  </p>
  
  <p>What's possibly wrong?</p>