const promise = new Promise(function (resolve) {
resolve('ok');
// setTimeout(function () {
throw new Error('test');
// }, 0);
});
promise.then(console.log);
注释去掉之后则可以
相关分类