canvas.getContext('2d');
// 캔버스에서 명령 가져오기
context.fillRect(x, y, 폭, 높이);
// 직사각형 영역 칠하기
index.html
<canvas id="my-canvas" width="400" height="400"></canvas>
script.js
const canvas = document.querySelector('#my-canvas');
const context = canvas.getContext('2d');
context.fillRect(0, 0, 200, 200);