Węzeł Settimeout JS
setTimeout(function () {
console.log("5 secondes");
}, 5000);
console.log("now");
adriendums
setTimeout(function () {
console.log("5 secondes");
}, 5000);
console.log("now");
setInterval(function () {
console.log("Every 5 secondes");
}, 5000);
console.log("now");
window.setInterval(function() {
// do stuff
}, 1000); // 1000 milliseconds (1 second)
var intervalID = setInterval(alert, 1000); // Will alert every second.
// clearInterval(intervalID); // Will clear the timer.
setTimeout(alert, 1000); // Will alert once, after a second.
setInterval(function(){
console.log("Oooo Yeaaa!");
}, 2000);//run this thang every 2 seconds
function intervalFunc() {
console.log('Cant stop me now!');
}
setInterval(intervalFunc, 1500);