Promises
-
Making (JavaScript) Promises
When writing JavaScript code you often, if not always, end up writing something that is asynchronous. Whether it’s responding to File I/O, a AJAX request using or user interaction the standard method have been to use
callback functions
. Writing a function that use callbacks can look something like the following