Skip to content

Commit 0be77b0

Browse files
authored
Clarify some things in 1.5.12
1 parent 15767fc commit 0be77b0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

1-js/05-data-types/12-json/article.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ JSON is data-only language-independent specification, so some JavaScript-specifi
105105
Namely:
106106

107107
- Function properties (methods).
108-
- Symbolic properties.
108+
- Symbolic keys and values.
109109
- Properties that store `undefined`.
110110

111111
```js run
@@ -276,6 +276,7 @@ name: John
276276
name: Alice
277277
place: [object Object]
278278
number: 23
279+
occupiedBy: [object Object]
279280
*/
280281
```
281282

@@ -328,6 +329,8 @@ alert(JSON.stringify(user, null, 2));
328329
*/
329330
```
330331

332+
The third argument can also be a string. In this case, the string is used for indentation instead of a number of spaces.
333+
331334
The `space` parameter is used solely for logging and nice-output purposes.
332335

333336
## Custom "toJSON"

0 commit comments

Comments
 (0)