Update article.md
This commit is contained in:
parent
a68022a8d6
commit
38dbb88c41
1 changed files with 2 additions and 3 deletions
|
@ -185,7 +185,6 @@ let json = JSON.stringify(value[, replacer, space])
|
||||||
|
|
||||||
value
|
value
|
||||||
: A value to encode.
|
: A value to encode.
|
||||||
|
|
||||||
replacer
|
replacer
|
||||||
: Array of properties to encode or a mapping function `function(key, value)`.
|
: Array of properties to encode or a mapping function `function(key, value)`.
|
||||||
|
|
||||||
|
@ -242,9 +241,9 @@ alert( JSON.stringify(meetup, *!*['title', 'participants', 'place', 'name', 'num
|
||||||
*/
|
*/
|
||||||
```
|
```
|
||||||
|
|
||||||
Now everything excepts `occupiedBy` is serialized. But the list of properties is quite long.
|
Now everything except `occupiedBy` is serialized. But the list of properties is quite long.
|
||||||
|
|
||||||
Fortunately, we can use a function instead the array as `replacer`.
|
Fortunately, we can use a function instead of an array as the `replacer`.
|
||||||
|
|
||||||
The function will be called for every `(key,value)` pair and should return the "replaced" value, which will be used instead of the original one.
|
The function will be called for every `(key,value)` pair and should return the "replaced" value, which will be used instead of the original one.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue