Update article.md

Maybe clarifying a bit where `.json()` comes from. I personally found it a bit confusing at first.
This commit is contained in:
Peter Roche 2020-02-03 20:23:05 -07:00 committed by GitHub
parent a193448b31
commit 9927cd09de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -252,7 +252,7 @@ fetch('/article/promise-chaining/user.json')
});
```
There is also a method `response.json()` that reads the remote data and parses it as JSON. In our case that's even more convenient, so let's switch to it.
The `response` object returned from `fetch` also includes the method `response.json()` that reads the remote data and parses it as JSON. In our case that's even more convenient, so let's switch to it.
We'll also use arrow functions for brevity: