```
const canvas = document.getElementById('canvas');
if (canvas) {
  const context = canvas.getContext('2d');
  const x = 100;
  const y = 100;
  const radius = 50;
  const color = 'red';
  context.beginPath();
  context.arc(x, y, radius, 0, 2 * Math.PI, false);
  context.fillStyle = color;
  context.fill();
} else {
  console.error('Canvas element not found.');
}
```
const canvas = document.getElementById('canvas');
if (canvas) {
  const context = canvas.getContext('2d');
  const x = 100;
  const y = 100;
  const radius = 50;
  const color = 'red';
  context.beginPath();
  context.arc(x, y, radius, 0, 2 * Math.PI, false);
  context.fillStyle = color;
  context.fill();
} else {
  console.error('Canvas element not found.');
}