function Promise(executor){
//resolve和reject都是函数
//resolve函数
function resolve(value){
}
//reject函数
function reject(reason){
}
//同步调用执行器函数
executor(resolve,reject)
}
//添加then方法
Promise.prototype.then = function(onResolved,onRejected){
}