We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
【js】Promise构造函数是同步执行还是异步执行,那么then方法呢?
The text was updated successfully, but these errors were encountered:
const promise = new Promise((resolve, reject) => { console.log(1); resolve(5); console.log(2); }).then(val => { console.log(val); });
promise.then(() => { console.log(3); });
console.log(4);
setTimeout(function() { console.log(6); });
执行结果: 124536 promise构造函数是同步执行的,then方法是异步执行的
Sorry, something went wrong.
No branches or pull requests
【js】Promise构造函数是同步执行还是异步执行,那么then方法呢?
The text was updated successfully, but these errors were encountered: