FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

lesson 4 code · git-pi-e/JavaScript-DOM-Tutorial@4fe3b43 · GitHub

Repository navigation

Commit 4fe3b43

Browse files
authored andcommitted
lesson 4 code
1 parent 66f2a2e commit 4fe3b43

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

‎app.js‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
const titles = document.getElementsByClassName('title');
1+
const wmf = document.querySelector('#book-list li:nth-child(2) .name');
2+
console.log(wmf);
23

3-
console.log(Array.isArray(titles));
4-
console.log(Array.isArray(Array.from(titles)));
4+
var books = document.querySelector('#book-list li .name');
5+
console.log(books);
56

6-
Array.from(titles).forEach(function(title){
7-
console.log(title);
7+
books = document.querySelectorAll('#book-list li .name');
8+
console.log(books);
9+
10+
Array.from(books).forEach(function(book){
11+
console.log(book);
812
});

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL