const canvas = document.getElementById("myCanvas"); const ctx = canvas.getContext("2d"); ctx.fillRect(10, 10, 50, 50);