Skip to content

Commit 38b92d3

Browse files
authored
Merge pull request #503 from adjiganoff/patch-1
Update null-undefined.md
2 parents ef515d2 + 24826db commit 38b92d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/javascript/null-undefined.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ The JSON standard has support for encoding `null` but not `undefined`. When JSON
117117
JSON.stringify({willStay: null, willBeGone: undefined}); // {"willStay":null}
118118
```
119119

120-
As a result, JSON-based databases may support `null` values but not `undefined` values. Since attributes set to `null` are encoded, you can transmit the intent to clear an attribute by settings its value to `null` before encoding and transmitting the object to a remote store.
120+
As a result, JSON-based databases may support `null` values but not `undefined` values. Since attributes set to `null` are encoded, you can transmit the intent to clear an attribute by setting its value to `null` before encoding and transmitting the object to a remote store.
121121

122122
Setting attribute values to undefined can save of storage and transmission costs, as the attribute names will not be encoded. However, this can complicate the semantics of clearing values vs. absent values.
123123

0 commit comments

Comments
 (0)