title: How to reload a javascript with a button on the website
body: <p>I'm coding a little snake game in javascript so me and my friends can play it onlyine and copare our highscores. But when you go game over, you have to reload the site and can't just press a button like "Try Again" and it restarts the game/reloads the javascript </p>
  
  <pre><code>if(snakeX &lt; box || snakeX &gt; 17 * box || snakeY &lt; 3*box || snakeY &gt; 17*box || collision(newHead,snake)){
      clearInterval(game);
      dead.play();
  }
  </code></pre>
  
  <p>that's the "game" interval <code>let game = setInterval(draw,100);</code></p>