Modern JavaScript Web Development Cookbook
上QQ阅读APP看书,第一时间看更新

How to do it...

Using functions as callbacks is the most classic way of dealing with async calls, but this has several disadvantages, such as code that is harder to read and series difficulties in dealing with some not-too-uncommon cases. Here, we'll look at two alternative ways of working.