I recently came across an explanation on how to properly use the setInterval()
function. Essentially, it was mentioned that
(function(){
// perform some actions
setTimeout(arguments.callee, 60000);
})();
ensures that the subsequent call from setTimeout is not initiated until the current one has completed. What is the reason behind this behavior when using self-invoking functions?