We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 995980e commit 138460bCopy full SHA for 138460b
1 file changed
app.js
@@ -1,6 +1,9 @@
1
const bookList = document.querySelector('#book-list');
2
3
-console.log('The parent node is:', bookList.parentNode);
4
-console.log('The parent node is:', bookList.parentElement.parentElement);
+console.log('book-list next sibling is:', bookList.nextSibling)
+console.log('book-list next element sibling is:', bookList.nextElementSibling)
5
6
-console.log(bookList.children);
+console.log('book-list previous sibling is:', bookList.previousSibling)
7
+console.log('book-list previous element sibling is:', bookList.previousElementSibling)
8
+
9
+bookList.previousElementSibling.querySelector('p').innerHTML += '<br/>Too cool for everyone else!'
0 commit comments