JavaScript is single threaded. To avoid blocking applications when performing an ajax request or reading a file, these operations are usually executed asynchronously. Some mechanism is then required to keep track of what is happening. The Problem Most asynchronous JavaScript APIs like XMLHttpRequest expose a way to assign a function, or callback, that will be invoked when the task is completed. Wh