Update article.md

"allows to use" -> "allows us to use"
"to use with await" -> "to use it with await"
This commit is contained in:
Peter Roche 2020-02-02 22:47:11 -07:00 committed by GitHub
parent d10b50ae7f
commit 4b124fb7df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -143,7 +143,7 @@ But we can wrap it into an anonymous async function, like this:
````
````smart header="`await` accepts \"thenables\""
Like `promise.then`, `await` allows to use thenable objects (those with a callable `then` method). The idea is that a third-party object may not be a promise, but promise-compatible: if it supports `.then`, that's enough to use with `await`.
Like `promise.then`, `await` allows us to use thenable objects (those with a callable `then` method). The idea is that a third-party object may not be a promise, but promise-compatible: if it supports `.then`, that's enough to use it with `await`.
Here's a demo `Thenable` class; the `await` below accepts its instances: