minor
This commit is contained in:
parent
446154fc69
commit
2753565f05
1 changed files with 1 additions and 1 deletions
|
@ -300,7 +300,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:
|
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, the exception is generated, same as if `throw error` were called at that very place.
|
||||||
2. Otherwise, it returns the result, so we can assign it to a value.
|
2. Otherwise, it returns the result.
|
||||||
|
|
||||||
Together they provide a great framework to write asynchronous code that is easy both to read and write.
|
Together they provide a great framework to write asynchronous code that is easy both to read and write.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue