title: Updating text with p5js
body: <p>I am have text defined in my draw loop that is updated from a global variable.  </p>
  
  
  
  <pre class="lang-javascript prettyprint-override"><code>  function draw() {
      ...
      levelText = text("level: " + level, 120, 100);
      pointsText = text("points: " + points, 120, 150);
      ...
  
    }
  </code></pre>
  
  <p>The problem is that, when I update the variables <em>level</em> and <em>points</em>, the previous text drawings remain on the canvas and the updated versions are numbers crossed out with other numbers.  How can I erase the previous number from then canvas when it is updated?  </p>