commit
36788a57a0
1 changed files with 1 additions and 1 deletions
|
@ -25,7 +25,7 @@ That's the expected result. JavaScript works like this. As `user.address` is `un
|
||||||
|
|
||||||
In many practical cases we'd prefer to get `undefined` instead of an error here (meaning "no street").
|
In many practical cases we'd prefer to get `undefined` instead of an error here (meaning "no street").
|
||||||
|
|
||||||
...And another example. In the web development, we can get an object that corresponds to a web page element using a special method call, such as `document.querySelector('.elem')`, and it returns `null` when there's no such element.
|
...and another example. In Web development, we can get an object that corresponds to a web page element using a special method call, such as `document.querySelector('.elem')`, and it returns `null` when there's no such element.
|
||||||
|
|
||||||
```js run
|
```js run
|
||||||
// document.querySelector('.elem') is null if there's no element
|
// document.querySelector('.elem') is null if there's no element
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue