 We can do that like this:</p>

<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code>
    <span class="c1">// set canvas id to variable</span>
  <span class="kd">var</span> <span class="nx">canvas</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">getElementById</span><span class="p">(</span><span class="s1">'draw'</span><span class="p">);</span>

  <span class="c1">// get canvas 2D context and set it to the corr