title: Execute setTimeout inside for loop after specific time intervals
body: <p>I want to loop through some numbers i.e. for each iteration loop should execute after specific time period like, 1st iteration should execute on the 1st second, next should execute after 2 seconds and so on...</p>
  
  <p>I am using the <a href="http://www.jaykayess.com/flapper/" rel="nofollow">flapper plugin</a> to display the numbers. Following is my snippet.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var $lucky = $('.lucky');
  $lucky.flapper({
    width: 1,
    chars_preset: 'alpha',
    align: 'right',
    timing: 1000,
    min_timing: 100,
    threshhold: 100,
    animation: 'slow',
    //transform: true,
  });
  
  $(document).ready(function() {
    var numbers = ['G', '1', '2', '3', '4', '5', '6'];
    var length = numbers.length;
    for (var i = 0; i &lt; length; i++) {
      console.log(numbers[i]);
      var $lucky = $('#lucky' + [i]);
      setTimeout(function() {
        var $lucky = $('#lucky' + [i]);
        var num = numbers[i];
        $lucky.val(num).change();
      }, 500);
      console.log(i);
    }
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.header {
    display: inline-block;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="container-fluid"&gt;
    &lt;input class="header light XXL lucky" id="lucky0" /&gt;
    &lt;input class="header light XXL lucky" id="lucky1" /&gt;
    &lt;input class="header light XXL lucky" id="lucky2" /&gt;
    &lt;input class="header light XXL lucky" id="lucky3" /&gt;
    &lt;input class="header light XXL lucky" id="lucky4" /&gt;
    &lt;input class="header light XXL lucky" id="lucky5" /&gt;
    &lt;input class="header light XXL lucky" id="lucky6" /&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>