This commit is contained in:
Kenneth Lum 2021-10-23 15:59:44 -07:00 committed by GitHub
parent eda333d423
commit 1310d542ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -298,7 +298,7 @@ The `async` keyword before a function has two effects:
The `await` keyword before a promise makes JavaScript wait until that promise settles, and then:
1. If it's an error, the exception is generated — same as if `throw error` were called at that very place.
1. If it's an error, an exception is generated — same as if `throw error` were called at that very place.
2. Otherwise, it returns the result.
Together they provide a great framework to write asynchronous code that is easy to both read and write.