How do I make a html canvas width attribute the value of a js variable?

like

        VARIABLEHERE1 = window.screen.availHeight;
        VARIABLEHERE2 = window.screen.availWidth;

canvas id=“myCanvas” width=“VARIABLEHERE1” height=“VARIABLEHERE2”

in Vanilla JS:

document.getElementById(“myCanvas”).width = VARIABLEHERE1;
document.getElementById(“myCanvas”).height = VARIABLEHERE2;