Drawing and animating

by soggydoughnut54

HTML

<canvas width="500" height="500" id="myCanvas"></canvas>

CSS

#myCanvas {
    border:1px solid #000;
}

JavaScript

/*************
variables to make program work
*************/
//access the canvas
var canvas = document.getElementById('myCanvas');
//access drawing environment
var context = canvas.getContext("2d");
//create a new image
var space = new Image(space);
//size variable
var size = y
//size growth
var y = y+1
//variables for rectangles

/***********
function for drawing stuff
ALL OF YOUR CODE GOES HERE vvvv
************/

function draw(rect) {
    //color
    context.fillStyle = "yellow";
    //shape
    context.fillRect(100, 100, 200, 200);
 }