Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

run for loop every second js

var time = 1;

var interval = setInterval(function() { 
   if (time <= 3) { 
      alert(time);
      time++;
   }
   else { 
      clearInterval(interval);
   }
}, 5000);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #run #loop #js
ADD COMMENT
Topic
Name
8+5 =