- Open
callback_hell.jsin your editor - Open
index.htmlin a browser to see the page in action - Notice how each callback is nested within another callback
$.get(url)will return a Promise that you can then use.then()on to get the results or to handle the error- Use the Promise-version of
$.getand chain them so as to get rid of the nested callbacks - Check your results by refreshing
index.htmlin a browser - Check your browser's console that you have no errors
michellescripts/promise-no-hell
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|