Chaining asynchronous javascript calls

The good thing about JavaScript is that its network/ajax calls are asynchronous. The bad thing about JavaScript is that its network/ajax calls are asynchronous. It’s bad because nested calls increase complexity. Look at the following sample methods: function f1(callback) { console.log('f1'); ... [More]