src/utils/executeInSeries.js
function(callbacks, args) {
            if (!callbacks.length) {
                return typeof done === 'function' ? done() : true;
            }

            var callback = callbacks.shift();
            callback.apply(context, args);

            // Is the callback synchronous ?
            if (callback.length === nbArguments) {
                iterator(callbacks, args, done);
            }
        }
function(callbacks, args) {
            if (!callbacks.length) {
                return typeof done === 'function' ? done() : true;
            }

            var callback = callbacks.shift();
            callback.apply(context, args);

            // Is the callback synchronous ?
            if (callback.length === nbArguments) {
                iterator(callbacks, args, done);
            }
        }
function ( callbacks , args ) { if ( ! callbacks . length ) { return typeof done === 'function' ? done ( ) : true ; } var callback = callbacks . shift ( ) ; callback . apply ( context , args ) ; // Is the callback synchronous ? if ( callback . length === nbArguments ) { iterator ( callbacks , args , done ) ; } }
clone the array to avoid modifying the original
clone the array to avoid modifying the original