Review my "delayed for-loop" in JavaScript
My experience with Javascript isn't quite as developed as it is for other languages, but here's what I have to say about the code.

Why use setInterval() and clearInterval()?  You'd use those methods if you wanted to call a function repeatedly.  Since all you do is set it and immediately clear it, there's no point in really using it.  Better to use setTimeout() instead.

I'd consider rearranging your parameters so the delay was last.  That way you can make the delay optional, possibly provide a default delay instead.  Also consider making complatedCallback optional too.  It could be possible that you don't need the callback so you're forcing yourself to have to provide one.

I don't think you'd want to put a delay of the first invocation on the first item.  So probably should remove that initial timeout and just call the executor() directly.

DelayedLoop.forEach = function(collection, callback, completedCallback, delay) {
    var index = 0;

    var executor = function() {
        // Executes the callback, and gets the returned value to indicate what the next delay will be.
        var newInterval = callback(collection[index++]);

        // If they returned false, quit looping.
        if (typeof(newInterval) == "boolean" &amp;&amp; newInterval == false) {
            return;
        }

        // If nothing / non-number is provided, re-use initial delay.
        if (typeof(newInterval) != "number") {
            newInterval = delay;
        } else if (newInterval &lt; 0) { // If a negative number is returned, quit looping.
            return;
        }

        // If there are more elements to iterate, re-set delayed loop. Otherwise, call the "completed" callback.
        if (index &lt; collection.length) {
            setTimeout(executor, newInterval);
        } else if (typeof(completedCallback) == "function") {
            completedCallback();
        }
    };

    // Initial loop setup.
    executor();
};


Otherwise I don't see anything glaringly wrong with the code.