mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-16 21:06:35 +08:00
fix(curriculum): mention browser console (#55881)
Some checks failed
i18n - Build Validation / Validate i18n Builds (20.x) (push) Has been cancelled
CI - Node.js / Lint (20.x) (push) Has been cancelled
CI - Node.js / Build (20.x) (push) Has been cancelled
CI - Node.js / Test (20.x) (push) Has been cancelled
CI - Node.js / Test - Upcoming Changes (20.x) (push) Has been cancelled
CI - Node.js / Test - i18n (italian, 20.x) (push) Has been cancelled
CI - Node.js / Test - i18n (portuguese, 20.x) (push) Has been cancelled
i18n - Download Client UI / Client (push) Has been cancelled
Some checks failed
i18n - Build Validation / Validate i18n Builds (20.x) (push) Has been cancelled
CI - Node.js / Lint (20.x) (push) Has been cancelled
CI - Node.js / Build (20.x) (push) Has been cancelled
CI - Node.js / Test (20.x) (push) Has been cancelled
CI - Node.js / Test - Upcoming Changes (20.x) (push) Has been cancelled
CI - Node.js / Test - i18n (italian, 20.x) (push) Has been cancelled
CI - Node.js / Test - i18n (portuguese, 20.x) (push) Has been cancelled
i18n - Download Client UI / Client (push) Has been cancelled
Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
This commit is contained in:
parent
b34291fc41
commit
3bc0bda634
@ -18,7 +18,7 @@ fetch("sample-url-goes-here")
|
||||
.then((res) => res)
|
||||
```
|
||||
|
||||
Chain the `.then()` method to your `fetch` call. Inside the `.then()` method, add a callback function with `res` as a parameter, then log the `res` to the console so you can see the `Response` object. Open your console and expand the `Response` object to see what it contains.
|
||||
Chain the `.then()` method to your `fetch` call. Inside the `.then()` method, add a callback function with `res` as a parameter, then log the `res` to the console so you can see the `Response` object. Open your browser console and expand the `Response` object to see what it contains.
|
||||
|
||||
Again, don't terminate the code with a semicolon yet.
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ dashedName: step-4
|
||||
|
||||
# --description--
|
||||
|
||||
The data you get from a `GET` request is not usable at first. To make the data usable, you can use the `.json()` method on the `Response` object to parse it into JSON. If you expand the `Prototype` of the `Response` object in the console, you will see the `.json()` method there.
|
||||
The data you get from a `GET` request is not usable at first. To make the data usable, you can use the `.json()` method on the `Response` object to parse it into JSON. If you expand the `Prototype` of the `Response` object in the browser console, you will see the `.json()` method there.
|
||||
|
||||
Remove `console.log(res)` and implicitly return `res.json()` instead.
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user