Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

setinterval js

// setInterval is used to run a piece of code everytime
// a certain amount of time which is defined in ms has been elapsed.
// Basic syntax is as follows: 
// setInterval(callback, time);

setInterval(() => {
alert("just checking on you :)");
}, 5000);  // displays an alert after every 5 seconds

Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #setinterval #js
ADD COMMENT
Topic
Name
6+3 =