fix(curriculum): mention browser console (#55881)

Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
This commit is contained in:
Harsh Renose
2024-08-17 00:21:40 +05:30
committed by GitHub
parent b34291fc41
commit 3bc0bda634
2 changed files with 2 additions and 2 deletions

View File

@@ -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.

View File

@@ -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.