So I taught of making something random. Then I wanted o to draw an image so I go documenting online and I come back with a small piece of code that for some reasons won't work.
const cvs = document.getElementById("gameArea"); const ctx = cvs.getContext("2d"); let playArea = new Image(); playArea.src="./Textures/play_area.png"; function draw(){ ctx.drawImage(playArea,0,0); } draw(); The image is in the textures folder that is in the same folder as the script.