Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

JavaScript promises MDN

doSomething()
.then(result => doSomethingElse(result))
.then(newResult => doThirdThing(newResult))
.then(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
1+4 =