Skip to content

michellescripts/promise-no-hell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Callback Hell vs Promises

  • Open callback_hell.js in your editor
  • Open index.html in 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 $.get and chain them so as to get rid of the nested callbacks
  • Check your results by refreshing index.html in a browser
  • Check your browser's console that you have no errors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors