1、如何修改 Promise 对象状态
1 | let p = new Promise((resolve, reject) => { |
resolve -> (pending -> fullfilled)
reject -> (pending -> rejected)
throw -> (pending -> rejected)
2、能否执行多个回调
1 | let p = new Promise((resolve, reject) => { |
可以执行多个回调
3、改变状态与指定回调顺序问题
1 | let p = new Promise((resolve, reject) => { |
4、then 方法的返回结果由什么决定
1 | let p = new Promise((resolve, reject) => { |
5、promise 如何串联多个任务
1 | let p = new Promise((resolve, reject) => { |
6、异常穿透
1 | let p = new Promise((resolve, reject) => { |
7、如何中断 Promise 链条
1 | let p = new Promise((resolve, reject) => { |