draw rectangle in html canvas code example
Example: js draw square to canvas
// canvas context.fillRect(x, y, height, width);
ctx.fillRect(20, 20, 150, 100);
// canvas context.fillRect(x, y, height, width);
ctx.fillRect(20, 20, 150, 100);