var canvas = document.querySelector('canvas'); // select 'canvas' element within document object
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
var c = canvas.getContext('2d'); // 'c' now has access to various objects within 2d space
c.fillRect(x, y, width, height);
c.fillStyle = "rgba(255, 0, 0, 0.5)"; // change fill color (red)
c.fillRect(100, 100, 100, 100); // red
c.fillStyle = "rgba(0, 0, 255, 0.5)"; // change fill color (blue)
c.fillRect(400, 100, 100, 100);
c.fillStyle = "rgba(0, 255, 0, 0.5)"; // change fill color (green)
c.fillRect(300, 300, 100, 100);
// Line
c.beginPath();
c.moveTo(50, 300);
c.lineTo(300, 100);
c.lineTo(400, 300);
c.strokeStyle = "#fa34ae"; // change line color
c.stroke(); // stroke method will show the line
// Arc / Circle
c.beginPath(); // separates the circle from any previous path/lines
c.arc(300, 300, 30, 0, Math.PI * 2, false);
c.strokeStyle = "blue";
c.stroke();