Update article.md

This commit is contained in:
Ilya Kantor 2017-07-14 09:16:52 +03:00 committed by GitHub
parent 362483e37f
commit 1757746fb6

View file

@ -12,9 +12,9 @@ async function f() {
}
```
The word "async" before a function means one simple thing: a function always returns a promise. If it's not so, then the value is wrapped in `Promise.resolve`.
The word "async" before a function means one simple thing: a function always returns a promise. If the code has `return <non-promise>` in it, then JavaScript automatically wraps it into a resolved promise with that value.
For instance, the code above returns `Promise.resolve(1)`:
For instance, the code above returns a resolved promise with the result of `1`:
```js run
async function f() {