实例解析ES6 Promise的原理和使用1. Promise 之前1.1 回调函数回调函数:把函数A当作参数传递给另一个函数B调用,那么A就是回调函数。【推荐:JavaScript视频教程】一些例子 具名回调function 你有几只狗(fn){ fn(一只狗)}func 1