Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

JavaScript promises MDN

doSomething()
.then(function(result) {
  return doSomethingElse(result);
})
.then(function(newResult) {
  return doThirdThing(newResult);
})
.then(function(finalResult) {
  console.log('Got the final result: ' + finalResult);
})
.catch(failureCallback);
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #JavaScript #promises #MDN
ADD COMMENT
Topic
Name
8+8 =