DEV Community

Help! (JS scripting question)

Steve on December 13, 2019

I've been coding for a grand total of three weeks, and have learned just enough HTML5, CSS, and JS to be dangerous. I've created the typical click...
Collapse
 
khuongduybui profile image
Duy K. Bui
  1. Call setTimeout() at the entry point of your application. If you are not using any framework, that can just be in a <script> tag at the end of your <body> :)
  2. setTimeout() only runs once, so to do a countdown, you need to call setTimeout again within the block called by setTimeout. Or you can just use setInterval().
Collapse
 
sehardwick profile image
Steve

Thanks - I'll play with this in the morning!