DEV Community

Discussion on: Help! (JS scripting question)

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!