We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 95cbdbf commit a9eb0d5Copy full SHA for a9eb0d5
1 file changed
app.js
@@ -1,12 +1,9 @@
1
-const wmf = document.querySelector('#book-list li:nth-child(2) .name');
2
-console.log(wmf);
+const books = document.querySelectorAll('#book-list li .name');
3
4
-var books = document.querySelector('#book-list li .name');
5
-console.log(books);
+Array.from(books).forEach(function(book){
+ book.textContent += ' (Book title)';
+});
6
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
- });
+const bookList = document.querySelector('#book-list');
+bookList.innerHTML = '<h2>Books and more books...</h2>';
+bookList.innerHTML += '<p>This is how you add HTML content</p>';
0 commit comments