Skip to content

Commit aeb02b2

Browse files
committed
6_lesson
1 parent ca9c7e5 commit aeb02b2

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

app.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
var books = document.querySelectorAll('#book-list li .name');
1+
const banner = document.querySelector('#page-banner');
22

3-
Array.from(books).forEach(function(book){
4-
book.textContent += ' (book title)';
5-
});
3+
console.log('#page-banner node type is:', banner.nodeType);
4+
console.log('#page-banner node name is:', banner.nodeName);
5+
console.log('#page-banner has child nodes:', banner.hasChildNodes())
66

7-
const bookList = document.querySelector('#book-list')
8-
//bookList.innerHTML = '<h2>Books and more books</h2>'
9-
bookList.innerHTML += '<p>This is how you add HTML</p>'
7+
const clonedBanner = banner.cloneNode(true);
8+
console.log(clonedBanner)

0 commit comments

Comments
 (0)