title: Javascript: Loop through Array with Delay
body: <p>I am trying to loop through an array, but want to output each value of the array with a delay. This is what my current understanding is on how it should work:</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Requested JS Fiddle: <a href="http://jsfiddle.net/d3whkjww/" rel="noreferrer">http://jsfiddle.net/d3whkjww/</a></p>
  
  <pre><code>    loopThroughSplittedText: function(splittedText) {
  
          for (var i = 0; i &lt; splittedText.length; i++) {
              // for each iteration console.log a word
              // and make a pause after it
              setTimeout(
                  console.log(splittedText[i]),
                  1000
              );
          };
  
      },
  </code></pre>
  
  <p>Yet, it does not work, and I believe it might be, because the arguments in the "for" loop have to be inside the setTimeout function. Yet I don't know how to make it work.</p>
  
  <p>All I get is every value of the array at once, but I want them appear with a delay. How do I do that?</p>