Skip to content

Commit 9de97ce

Browse files
committed
Merge pull request #143 from passy/js4-fix
Fix JSON example code in JS4
2 parents cfbf6d0 + 0e6bf85 commit 9de97ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js/lesson4/tutorial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ useful if we want to exchange data over HTTP which works understands with text.
7878
You can use `JSON.parse` to turn JSON strings into real JavaScript objects.
7979

8080
```js
81-
var londonJson = '"{"name":"London","population":8308369}"';
82-
var london = JSON.parse(response);
81+
var londonJson = '{"name":"London","population":8308369}';
82+
var london = JSON.parse(londonJson);
8383
console.log(london.name);
8484
```
8585

0 commit comments

Comments
 (0)