We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3220ad1 commit f7650feCopy full SHA for f7650fe
app.js
@@ -1,6 +1,9 @@
1
const bookList = document.querySelector('#book-list');
2
3
-console.log('the parent mode is:', bookList.parentNode);
4
-console.log('the parent element 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.childNodes);
+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