<canvas width = "600" height = "400"></canvas>
<script>
let canvas = document.querySelector ("canvas");
let pincel = canvas.getContext ("2d");
//Dimensões cabeça:
let xCabeca = 200;
let yCabeca = 100;
let wCabeca = 350;
let hCabeca = 300;
pincel.fillStyle = "darkgreen";
pincel.fillRect (xCabeca, yCabeca, wCabeca, hCabeca);
//Dimensões olhos:
let xOlhoEsq = 250;
let yOlhoEsq = 150;
let xOlhoDir = 410;
let yOlhoDir = 150;
let wOlhos = 90;
let hOlhos = 90;
pincel.fillStyle = "black";
pincel.fillRect (xOlhoEsq, yOlhoEsq, wOlhos, hOlhos);
pincel.fillStyle = "black";
pincel.fillRect (xOlhoDir, yOlhoDir, wOlhos, hOlhos);
//Dimensões nariz:
let xNariz = 340;
let yNariz = 240;
let wNariz = 70;
let hNariz = 100;
pincel.fillStyle = "preto";
pincel.fillRect (xNariz, yNariz, wNariz, hNariz);
//Dimensões barba:
let xBarbaEsq = 300;
let xBarbaDir = 410;
let yBarbas = 300;
let wBarbas = 40;
let hBarbas = 110;
pincel.fillStyle = "black";
pincel.fillRect (xBarbaEsq, yBarbas, wBarbas, hBarbas);
pincel.fillStyle = "black";
pincel.fillRect (xBarbaDir, yBarbas, wBarbas, hBarbas);
</script>