📅  最后修改于: 2022-03-11 15:02:16.081000             🧑  作者: Mango
function a() {
return new Promise(function(resolve) {
setTimeout(function() {
console.log('a');
resolve();
}, 500)
});
}
function b() {
return new Promise(function(resolve) {
setTimeout(function() {
console.log('b');
resolve();
}, 250);
});
}
a().then(b).then(function() {/* do something else */})