title: Using setTimeout in a Loop
body: <pre><code>function showColors() {
    $.each(colorList, function(value) {
      setTimeout(function(){
        revealColor(colorList[value]);
      }, 1000);
    });
  }
  </code></pre>
  
  <p>I'm basically trying to set things up here so the revealColor function runs every 1000 milliseconds until I hit the end of the entire colorList array. Unfortunately, it queues up all the setTimeout events instantly and then 1000 milliseconds later, the revealColor function runs once for every value in the array.</p>
  
  <p>I'm sure there's an easier way to do this that I'm just not seeing. Any help would be great!</p>