title: i can't validate the random words for my game in JavaScript
body: <p>I need help in my code by the way its a typing game that has timer and a life and a scoreboard im also  a beginner in JavaScript my problem here is i want to snuffle again the word after the user got the answer correct or got the wrong answer sorry for my english</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var words = ["PRINTF","SCANF","GETCH","MAIN"];
      var life;
      var seconds;
      var temp;
      var score=0;
      //Timer
      function countdown() {
      seconds = document.getElementById('countdown').innerHTML;
      seconds = parseInt(seconds, 10);
      if (seconds == 0) {
        temp = document.getElementById('countdown');
        alert("TIME IS UP!");
        document.getElementById("countdown") = 0;
      }
      seconds--;
      temp = document.getElementById('countdown');
      temp.innerHTML = seconds;
      timeoutMyOswego = setTimeout(countdown, 1000);
      }
     
      //Random
      var getRandomWord = function () {
      return words[Math.floor(Math.random() * words.length)];
      }
      var word = getRandomWord();  
      //Display
      function start(){  
      document.getElementById("display").innerHTML = word;   
      }
  
      // Validate the entered word
      function go() {
      var input = document.getElementById("demo").value;
      var input1 = input.toUpperCase();
       
      if (word==input1){
         alert('Correct');
         score=score+1;
         document.getElementById("score").innerHTML = score;
         start();
      }
      else 
      {
          alert('Wrong');
          start();
          life = document.getElementById('life').innerHTML;
          life = parseInt(life);
          life = life-1;
          document.getElementById("life").innerHTML = life;    
      }
      }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;body onLoad = "countdown(); start();"&gt;
      Time: &lt;span id="countdown" style="font-weight: bold;"&gt;11&lt;/span&gt;&lt;br&gt;
      Life: &lt;span id="life" style="font-weight: bold;"&gt;3&lt;/span&gt;&lt;br&gt;
      Score:&lt;span id="score" style="font-weight: bold;"&gt;0&lt;/span&gt;&lt;br&gt;
      WORD: &lt;span id="display"&gt;&lt;/span&gt;
      &lt;section id="f1"&gt;
      &lt;input type="text" id="demo"  onkeydown="if (event.keyCode == 13) go();" &gt;
      &lt;/section&gt;
      &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>