📜  JavaScript 承诺 MDN - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:10.379000             🧑  作者: Mango

代码示例10
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);