title: getElementById returning null for Canvas element
body: <p>When I run the code below I get 'null' for the variable surface. Can anyone tell me what I'm doing wrong?</p>
  
  <pre><code>&lt;html&gt;
  
  &lt;body&gt;
      &lt;script&gt;
          var surface = document.getElementById("myCanvas");
          console.log("surface: " + surface);
      &lt;/script&gt;
  
      &lt;canvas id="myCanvas" width="300" height="150"&gt;
          &lt;p&gt;Your browser doesn't support canvas.&lt;/p&gt;
      &lt;/canvas&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>