(为啥用promise)
基本用法
Promise实例生成以后,可以用then方法分别指定resolved状态和rejected状态的回调函数。
Promise
then
resolved
rejected
一个简单的例子
es6 Promise对象
原文:https://www.cnblogs.com/huancheng/p/10565054.html