Skip to content

Commit 62fb06b

Browse files
committed
lesson 6
1 parent 09f08a4 commit 62fb06b

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

app.js

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
const wmf = document.querySelector('#book-list li:nth-child(2) .name');
2-
// console.log(wmf);
1+
const banner = document.querySelector('#page-banner');
32

4-
var books = document.querySelector('#book-list li .name');
5-
// console.log(books);
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-
books = document.querySelectorAll('#book-list li .name');
8-
//console.log(books);
9-
10-
Array.from(books).forEach(function(book){
11-
console.log(book);
12-
});
7+
const clonedBanner = banner.cloneNode(true);
8+
console.log(clonedBanner);

0 commit comments

Comments
 (0)