Untangle ajax chain requests using Deferred and Promise

In javascript, the completion of an asynchronous function is handled via call backs. We generally provide two callback functions to handle success and failure result of async function. Sometimes a situation arises where the execution of one async function depends upon the result of previous async function. The typical example of an asynchronous function is jquery’s ajax request.

Continue reading