Promise(3.1) 自定义(手写)Promise —— 初始结构搭建 有蝉 2021-05-23 97 阅读1分钟 function Promise(executor){ } //添加then方法 Promise.prototype.then = function(onResolved,onRejected){ }