canvas.style.display = “block” not working in HTML5


Change the setTimeout() to use a function reference. It works as the function available at the time the reference.

The reference will be transferred to the timeout event callback rather than a string reference:

window.setTimeout(startNow, 2000);

Set it like the following:

setTimeout(startNow, 1000);
function startNow () {
   alert(‘Working correctly!');
}

karthikeya Boyini
karthikeya Boyini

I love programming (: That's all I know

Updated on: 29-Jan-2020

150 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements