Hi , on clicking the button the event listener is not showing any log.
Here is the code -
canvas = document.getElementById(“mycanvas”);
function f(){
console.log(“You clicked on the canvas”);
}
canvas.addEventListener(‘click’,f);
function f2() {
console.log(“A key was pressed”,e);
}
canvas.addEventListener(“keydown”,f2);