title: "canvas.clearRect is not a function" when I clear the canvas
body: <p>I'm trying to draw a circle in a HTML5 canvas and move it around.</p>
  
  <p>I wrote this Javascript code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var a = 0;
        function draw() {
          var c = document.getElementById("game");
          var ctx = c.getContext("2d");
          ctx.clearRect(0, 0, canvas.width, canvas.height);
          ctx.beginPath();
          ctx.arc(45+a, 45, 40, 0, 2 * Math.PI);
          ctx.stroke();
          a++;
        }
        var t=setInterval(draw,1000);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;canvas id="game" width="640" height="480"&gt;&lt;/canvas&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>When I try to execute it, I get this error in the console:</p>
  
  <p><em>TypeError: canvas.clearRect is not a function</em></p>
  
  <p>How can I fix it? </p>
  
  <p>Thank you.</p>