<canvas id="myCanvas" width="500" height="300"></canvas>
const canvas = document.getElementById('myCanvas');
const ctx = canvas.getContext('2d');
// Начинаем новый путь
ctx.beginPath();
// Рисуем окружность
ctx.arc(200, 150, 50, 0, Math.PI * 2);
// Устанавливаем цвет заливки
ctx.fillStyle = 'blue';
// Заливаем окружность
ctx.fill();
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.