title: Button won't hide in p5 javascript
body: <p>I'm having an issue trying to hide a button I've created with <code>p5.js</code>:</p>
  
  <pre><code>var quit_button;
  var pause = false;
  
  function keyPressed() {
    if (keyCode == '80') { // If p is pressed on the keyboard
      if (pause === true) {
        quit_button.hide()
        pause = false;
      } else {
        pause = true;
      }
    }
  }
  
  function restart() {
    quit_button.hide() // This isn't working
    pause = false;
    setup()
  }
  
  function setup() { //Start-up screen
    createCanvas(600, 400);
  }
  
  function draw() {
    background('#fae'); //This creates a new canvas
    if (pause === true) {
        quit_button = createButton('quit')
        quit_button.position(300,200)
        quit_button.mousePressed(restart)
        text("Game has been paused. Press P to resume.", 100, 100)
      } else {
      }
  }
  </code></pre>
  
  <p>When I run the code and press <code>p</code> to pause my snake game, the game pauses (as expected). However, if I press <code>p</code> to unpause or if I click 'quit', the <code>quit</code> button is still there.</p>