Skip to content

fix: 将“需要”改成“多个” #1245

New issue

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 1-js/11-async/08-async-await/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,4 +307,4 @@ Promise 前的关键字 `await` 使 JavaScript 引擎等待该 promise settle,

这两个关键字一起提供了一个很好的用来编写异步代码的框架,这种代码易于阅读也易于编写。

有了 `async/await` 之后,我们就几乎不需要使用 `promise.then/catch`,但是不要忘了它们是基于 promise 的,因为有些时候(例如在最外层作用域)我们不得不使用这些方法。并且,当我们需要同时等待需要任务时,`Promise.all` 是很好用的。
有了 `async/await` 之后,我们就几乎不需要使用 `promise.then/catch`,但是不要忘了它们是基于 promise 的,因为有些时候(例如在最外层作用域)我们不得不使用这些方法。并且,当我们需要同时等待多个任务时,`Promise.all` 是很好用的。