update null examples

Este commit está contenido en:
AJ ONeal 2018-07-31 16:58:36 +00:00
padre 21098984f1
commit 2e4745b189
Se han modificado 1 ficheros con 17 adiciones y 0 borrados

Ver fichero

@ -97,6 +97,23 @@ null === store.get('non-existant-key');
The special case of `null` as `"null"`, aka `"\"null\""`:
```
typeof null // object
typeof "null" // string
typeof "\"null\"" // string
```
`null`, and `"null"` both parse as `null` the "object", instead of one being the string (which would be `"\"null\""`).
```
JSON.parse(null) // null (object)
JSON.parse("null") // null (object)
JSON.parse("\"null\"") // 'null' (string)
```
Objects containing `null`, however, parse as expected `{ "foo": null, "bar": "null" }` will parse as `foo` being `null` but `bar` being `"null"`, much unlike the value `"null"` being parsed on its own.
```
JSON.parse('{ "foo": null }') // { foo: null }
JSON.parse('{ "foo": "null" }') // { foo: 'null' }
```