title: Need help, JavaScript and HTML not showing on Explorer
body: <p>I tried to use the code that the channel "The Coding Train" made to produce a Snake Game. However, I don't have p5 and I tried to add everything on a HTML file using the <code>&lt;script&gt;</code> and <code>&lt;/script&gt;</code>. And I called the functions that in the original code it was not there...</p>
  
  <p>Can anyone help me and tell me what I have done wrong...? I tried a lot of things but the page is always empty...</p>
  
  <p>Thanks! :)</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-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
   &lt;head&gt;
    &lt;title&gt;Snake Game&lt;/title&gt;
   &lt;/head&gt;
   &lt;body&gt;
      &lt;script type="text/javascript"&gt;
     var s;
     var scl = 20;
     var food;
  
     function setup() {
      createCanvas(600,600);
      s = new Snake();
      frameRate(10);
      pickLocation();
     }
     
     function pickLocation() {
      var cols = floor(width/scl);
      var rows = floor(height/scl);
      food = createVector (floor (random (cols)), floor (random (rows)));
      food.mult (scl);
     }
     
     function draw() {
      background (51);
      
      if (s.eat(food)) {
       pickLocation();
      }
      
      s.death();
      s.update();
      s.show();
  
      fill(255,0,100);
      rect(food.x, food.y, scl, scl);
     }
     
     function keyPressed() {
      if (keyCode === UP_ARROW) {
       s.dir (0,-1);
      } else if (keyCode === DOWN_ARROW) {
       s.dir (0,1);
      } else if (keyCode ===  RIGHT_ARROW) {
       s.dir (1,0);
      } else if (keyCode === LEFT_ARROW) {
       s.dir (-1,0);
      }
     }
     
     function Snake() {
      this.x = 0;
      this.y = 0;
      this.xspeed = 1;
      this.yspeed = 0;
      this.total = 0;
      this.tail = [];
  
      this.eat = function(pos) {
       var d = dist(this.x, this.y, pos.x, pos.y);
       if (d&lt;1) {
        this.total++;
        return true;
       } else {
        return false;
       }
      }
    
      this.dir = function (x, y) {
       this.xspeed = x;
       this.yspeed = y;
      }
      
      this.death = function() {
       for (var i = 0; i &lt; this.tail.length; i++) {
        var pos = this.tail[i];
        var d = dist (this.x, this.y, pos.x, pos.y);
        if (d&lt;1) {
         this.total = 0;
         this.tail = [];
        }
       }
      }
  
      this.update = function() {
       for (var i = 0; i &lt; this.tail.length -1 ; i++) {
        this.tail[i] = this.tail[i+1];
       }
       if (this.total &gt;= 1) {
        this.tail[this.total-1] = createVector(this.x, this.y);
       }
     
       this.x = this.x + this.xspeed * scl;
       this.y = this.y + this.yspeed * scl;
  
       this.x = constrain(this.x, 0, width - scl);
       this.y = constrain(this.y, 0, height - scl);
      }
     
      this.show = function() {
       fill(255);
       for (var i = 0; i &lt; this.tail.length; i++) {
        rect(this.tail[i].x; this.tail[i].y, scl, scl);
       }
       rect(this.x, this.y, scl, scl);
      }
  
     }
  
     setup();
     pickLocation();
     draw();
     keyPressed();
     Snake();
    &lt;/script&gt;
   &lt;/body&gt;
  &lt;html&gt;</code></pre>
  </div>
  </div>
  </p>