📜  然后返回 javascript 代码示例

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

代码示例1
const promise1 = new Promise((resolve, reject) => {
  resolve('Success!');
});

promise1.then((value) => {
  console.log(value);
  // expected output: "Success!"
});