title: How to make a 1s second pause inside a forEach loop reading a firebase file?
body: <p>I have the follow javascript function that reads data from firebase inside an each loop.</p>
  
  <p>I am using it to plot the data in a google map trough its API.</p>
  
  <p>I would like to know how to make a 1second pause between each round of the loop.</p>
  
  <pre class="lang-js prettyprint-override"><code>var markers = [];
  var mapObject;
  var z = 0;
  var myLatLngA = [];
  
  $(function() {
    firebase.database().ref('clicks').on('value', function(snapshot) {
      snapshot.forEach(function(item) {
        var objc = {
          lat: item.val().lat,
          lng: item.val().lng
        };
        myLatLngA.push(objc);
        //setMapOnAll(null);
        var marker = new google.maps.Marker({
          position: myLatLngA[z],
          map: mapObject
        });
        markers.push(marker);
        marker.setMap(mapObject);
        z++;
      });
    });
  });
  </code></pre>