title: How to create a restart button for a game in Java Script
body: <p>I am new to JavaScript.</p>
  
  <p>I have been creating a game- which includes the number of goes a person has had to guess a random number.</p>
  
  <p>I have created the button however I am having problems trying to restart the game - making a new random number to be generated and the number of goes to return to 0</p>
  
  <pre><code>var randomno =Math.floor(Math.random() * 100 ) + 1;
      let restart = document.getElementById("restart");
      function restartGame(){    
          num();
      }
  }
  restartGame();
  </code></pre>
  
  <p>This is only a small snippet of my code.</p>