how to draw text into a canvas? [duplicate]

What happens

  • What i tried
function draw() {
    canvas.width = canvaWidth;
    canvas.height = canvaHeight;
    ctx.fillStyle("blue")
    ctx.font("48px serif");
    ctx.fillText("test", 10, 10);
}

draw();

What should happen

Should have text in it