Canvas drawing wont show
<p>I was making a web game just for a little practice, but my drawing will not show in the canvas element of the browser. I do not know why it will not show. By the way, I used variables as the value of the horizontal position so that I could easily change them later. </p>

<p><strong>JavaScript</strong></p>

<pre><code>var canvas = getElementById('myCanvas');
var blt = canvas.getContext('2d');
var bS = 20;
var x = 220;
var y = 340;
var x1 = 227;
var x2 = 229;
var x3 = 240;
var x4 = 251;
var x5 = 253;
var x6 = 260;

function drawShip() {
  blt.beginPath();
  blt.moveTo(x,360);
  blt.lineTo(x,340);
  blt.lineTo(x1,337);
  blt.lineTo(x2,337);
  blt.lineTo(x2,340);
  blt.lineTo(x3,330);
  blt.lineTo(x4,340);
  blt.lineTo(x4,337);
  blt.lineTo(x5,337);
  blt.lineTo(x6,340);
  blt.lineTo(x6,360);
  blt.lineTo(x,360);
  blt.closePath();
};

drawShip();
</code></pre>