json examples fix

avoid using 'text' as a variable name since it is reserved and returns an error
pull/61/head
Patrick Njuguna 5 years ago committed by GitHub
parent c8eab858a8
commit 75a187864d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -327,8 +327,8 @@ const users = {
} }
} }
const text = JSON.stringify(users, undefined, 4) const txt = JSON.stringify(users, undefined, 4)
console.log(text) // text means JSON- because json is a string form of an object. console.log(txt) // text means JSON- because json is a string form of an object.
``` ```
```sh ```sh
@ -446,8 +446,8 @@ const user = {
points: 30 points: 30
} }
const text = JSON.stringify(user,['firstName', 'lastName', 'country', 'city', 'age'],4) const txt = JSON.stringify(user,['firstName', 'lastName', 'country', 'city', 'age'],4)
console.log(text) console.log(txt)
``` ```
```sh ```sh

Loading…
Cancel
Save