title: Javascript: Traversing through array and accessing its various elements?
body: <p>Essentially what I'm trying to do right now is, given some input text, I split it up by white space and display on a </p>
  
  <pre><code>div id= "animation"
  </code></pre>
  
  <p>Every time a button is clicked, the array should go forward one word.</p>
  
  <p>This is my current attempt.</p>
  
  <pre><code>function displayText() {
      var displayText = document.getElementbyID("animation");
      var list = (document.getElementbyID("input").split(/[ \tn]+/);
      for (var i = 0; i &lt; list.length; i++) {
          displayText.innerHTML = list.get[i];
      }
  }
  </code></pre>
  
  <p>Is my thought process somewhat correct? For whatever reason, it doesn't seem to be working.</p>