You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1-js/04-object-basics/07-optional-chaining/article.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ In many practical cases we'd prefer to get `undefined` instead of an error here
28
28
...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.
29
29
30
30
```js run
31
-
//the result of the call document.querySelector('.elem') may be null
31
+
// document.querySelector('.elem') is null if there's no element
32
32
let html =document.querySelector('.elem').innerHTML; // error if it's null
0 commit comments