Skip to content

Commit 75a1878

Browse files
authored
json examples fix
avoid using 'text' as a variable name since it is reserved and returns an error
1 parent c8eab85 commit 75a1878

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

16_Day/16_day_json.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,8 @@ const users = {
327327
}
328328
}
329329

330-
const text = JSON.stringify(users, undefined, 4)
331-
console.log(text) // text means JSON- because json is a string form of an object.
330+
const txt = JSON.stringify(users, undefined, 4)
331+
console.log(txt) // text means JSON- because json is a string form of an object.
332332
```
333333

334334
```sh
@@ -446,8 +446,8 @@ const user = {
446446
points: 30
447447
}
448448

449-
const text = JSON.stringify(user,['firstName', 'lastName', 'country', 'city', 'age'],4)
450-
console.log(text)
449+
const txt = JSON.stringify(user,['firstName', 'lastName', 'country', 'city', 'age'],4)
450+
console.log(txt)
451451
```
452452

453453
```sh
@@ -594,4 +594,4 @@ const text = `{
594594

595595
🎉 CONGRATULATIONS ! 🎉
596596

597-
[<< Day 15](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master/15_Day/15_day_classes.md) | [Day 17 >>](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master/17_Day/17_day_web_storage.md)
597+
[<< Day 15](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master/15_Day/15_day_classes.md) | [Day 17 >>](https://github.com/Asabeneh/30DaysOfJavaScript/blob/master/17_Day/17_day_web_storage.md)

0 commit comments

Comments
 (0)