A javascript class that allows us to register several different functions to execute a single common callback function

The purpose of the class is to execute all the registered functions asynchronously and then, once all of them are finished, It should execute the defined callback function. (function() { function Batch(functions, completionHandler) { this._functions = functions; this._completionHandler = completionHandler; } Batch.prototype.execute = function execute() { var i; var functions = this._functions; var length = […]

Read More