Promis 实例
捕获Promise 中的 reject 与 exception
 
 
  | 
 
 
  | 
 
 
 
  | 
![]()  | 
Wrong sample
![]()  | 
捕获Promise 中的 reject 与 exception
![]()  | 
![]()  | 
多个Promise.all(Promise)后resolve, 得到最后一个promise的resolve结果
![]()  | 
![]()  | 
多个Promise.all(Promise),catch 所有promise.all(Promise) 的reject
![]()  | 
![]()  | 
Promise 顺序执行多个异步函数
![]()  | 
![]()  | 
Catch / Reject监听多个异步函数的错误
| 
 
 
 -------------------------------------------------------------------------------------- 
  | 
| 
 
 ------------------------------------------------------------------------------- 
 
  | 
| 
 
 
 ------------------------------------------------------------ 
  | 
| 
 
 
 ----------------------------------------------- 
  | 
Promise.Resolve
- fun1 本身是个promise
 
![]()  | 
![]()  | 
![]()  | 
console 结果一样
     
- 
fun1 不是promise, 不能接 then
 
![]()  | 
![]()  | 
console 结果

- 
错误用法,
这样resolve()内的函数无法执行,不管是promise 还是function
 
![]()  | 

                    
                
























                
            
        
浙公网安备 33010602011771号