Skip to content

Commit 300338a

Browse files
authored
Merge pull request #1273 from James868/patch-1
Fix typo
2 parents 8c30654 + 812daa9 commit 300338a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

2-ui/1-document/03-dom-navigation/3-navigation-links-which-null/solution.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
1. Yes, true. The element `elem.lastChild` is always the last one, it has no `nextSibling`.
2-
2. No, wrong, because `elem.children[0]` is the first child *among elements*. But there may exist non-element nodes before it. So `previousSibling` may be a text node. Also, if there are no children, then trying to access `elem.children[0]`
2+
2. No, wrong, because `elem.children[0]` is the first child *among elements*. But there may exist non-element nodes before it. So `previousSibling` may be a text node.
33

44
Please note: for both cases if there are no children, then there will be an error.
55

0 commit comments

Comments
 (0)