多個異步操作,如果中間出現reject后面應該不會再執行,為什么下面代碼中第二個then函數還會執行?function getJson(idx){ return new Promise(function(resolve,reject){ setTimeout(function(){ var random = Math.floor(Math.random() * 1000); console.log('success'+random); reject(random); },1000) })}getJson(13).then(function(){ return getJson(14);},function(){ console.log(arguments) return "adas";}).then(function(){ return getJson(15);}).then(function(){ return getJson(16);})
promise中調用reject,后面的then方法還會執行?
LEATH
2018-10-04 15:13:58