Skip to content

Commit 269bba5

Browse files
committed
lesson 5
1 parent 0c12a58 commit 269bba5

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

app.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
const wrap = document.querySelector('#book-list li:nth-child(2) .name');
2-
//console.log(wmf);
3-
4-
var books = document.querySelector('#book-list li .name');
5-
// console.log(books);
1+
const books = document.querySelectorAll('#book-list li .name');
62

73
Array.from(books).forEach(function(book){
8-
console.log(book);
9-
})
4+
book.textContent += ' (Book title)';
5+
});
6+
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 content</p>';

0 commit comments

Comments
 (0)