var c = document.getElementById("myCanvas"); var ctx = c.getContext("2d"); ctx.strokeStyle = "#FF0000"; ctx.strokeRect(20, 20, 150, 100);
const context = canvas.getContext('2d'); context.strokeStyle = 'blue'; context.strokeRect(100, 100, 50, 50);