title: How to use split() and setTimeout() in arrays javascript
body: <p>It may be a little confusing :S</p>
  
  <p>If anyone can help me to split an array of strings into letters. And than to tape it with time-outs. Like in DOS.</p>
  
  <p>I can do this with single strings, but i can't do it in arrays.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>var text = new Array();
  text[0] = "welcome ".split('');
  text[1] = "how are u?".split('');
  var delay = 20;
  for (var j = 0; j &lt; text.length; j++) {
  
      var txt = text[j];
      for (u = 0; u &lt; txt.length; u++) {
          setTimeout(function () {
              $('div#console_div').append('&lt;br /&gt;' + txt.shift());
          }, delay * j + 100);
      }
  }
  </code></pre>