Skip to content

Commit 4fe3b43

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

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

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)