[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/Nur1995/JavaScript-DOM-Tutorial/lesson-7/app.js [Back]  [Original]

const bookList = document.querySelector('#book-list');

console.log('book list parent element:', bookList.parentElement);
console.log('book list parent node:', bookList.parentNode);

console.log('all node children:');
Array.from(bookList.childNodes).forEach(function(node){
  console.log(node);
});

console.log('all element children:');
Array.from(bookList.children).forEach(function(node){
  console.log(node);
});

const titles = bookList.querySelectorAll('.name');

console.log('Book titles:');
Array.from(titles).forEach(function(title){
  console.log(title.textContent);
});

Web Proxy Viewer  |  New URL  |  Original Page