title: Can't get my word randomizer script to loop properly
body: <p>I'm trying to get this script to run, than end on the word Awesome. and then loop again/repeat.</p>
  
  <p>Here's the JS</p>
  
  <pre class="lang-js prettyprint-override"><code>var i, word, rnd, words, fadeSpeed, timer;
  
  words = ['respected​.', 'essential.', 'tactical.', 'effortless.', 'credible.', 'smart.', 'engaging.', 'focused.', 'effective.', 'clear.', 'relevant.', 'strategic.', 'trusted.', 'compelling.', 'admired.', 'inspiring.', 'cogent.', 'impactful.', 'valued.'];
  
  fadeSpeed = 500;
  timer = 2000;
  
  for (i = 0; i &lt; 20; i++) {
      if (i === 19) {
          word = 'awesome.';
          rnd = Math.floor(Math.random() * words.length);
          word = words[rnd];
          words.splice(rnd, 1);
      } else {
          rnd = Math.floor(Math.random() * words.length);
          word = words[rnd];
          words.splice(rnd, 1);
      }
  
      (function(word) {
          $('h1.random em').fadeOut(fadeSpeed, function() {
                  $(this).html(word);
              })
              .slideDown('slow')
              .delay(timer)
              .fadeIn(fadeSpeed);
      })(word);
  }
  </code></pre>
  
  <p>Here's a link to the dev site.</p>
  
  <p><a href="http://dev-pivot-website.pantheon.io/#" rel="nofollow">http://dev-pivot-website.pantheon.io/#</a></p>