alertBox()
Doesn’t this look like an immediate function call?
Try passing the function (without executing it) instead:
setInterval(alertBox, 5000);
More Related Contents:
- How can I pass a parameter to a setTimeout() callback?
- Pass correct “this” context to setTimeout callback?
- Why does the setInterval callback execute only once?
- How to make `setInterval` behave more in sync, or how to use `setTimeout` instead?
- setInterval/setTimeout return value
- Will setInterval cause browsers to hang?
- recursive function vs setInterval vs setTimeout javascript
- setTimeout in a for loop with array as an argument misbehaving
- How do I convert an existing callback API to promises?
- Calling a function every 60 seconds
- Execute the setInterval function without delay the first time
- Best way to iterate over an array without blocking the UI
- What is minimum millisecond value of setTimeout?
- Getting a better understanding of callback functions in JavaScript
- CSS transition doesn’t start/callback isn’t called
- Create a custom callback in JavaScript
- Is there ever a good reason to pass a string to setTimeout?
- setTimeout ignores timeout? (Fires immediately) [duplicate]
- Why the function called by setTimeout has no callstack limit?
- How do I reset the setInterval timer?
- Is it possible to catch exceptions thrown in a JavaScript async callback?
- Callback function example
- passing index from for loop to ajax callback function (JavaScript)
- Maximum call stack size exceeded on SetTimeout recursive function (Javascript) [duplicate]
- Asynchronous Script Loading Callback
- How to test a function which has a setTimeout with jasmine?
- Javascript setInterval not working
- Why is the function executed immediately when I use setTimeout?
- Call setTimeout without delay
- setTimeout(): If not defined in EcmaScript spec, where can I learn how it works?