Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js setinterval vs settimeout

var intervalID = setInterval(alert, 1000); // Will alert every second.
// clearInterval(intervalID); // Will clear the timer.

setTimeout(alert, 1000); // Will alert once, after a second.
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #setinterval #settimeout
ADD COMMENT
Topic
Name
1+3 =