Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Refactor so image can be moved within li and always corresponds to sa…
…me info
  • Loading branch information
nuanprae committed Feb 19, 2021
commit 38f6ef79e9c4dec5fb2abe38b7fdf9b5fcad9260
6 changes: 1 addition & 5 deletions Week1/homework/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
const generateItems = (info, images) => {
const ul = document.createElement('ul');
document.body.appendChild(ul);
// loop over bookObj and append each li (with info) to ul
// loop over bookObj and append each li to ul (book info and book cover)
for (const key of Object.keys(info)) {
const li = document.createElement('li');
ul.appendChild(li);
Expand All @@ -123,10 +123,6 @@
li.appendChild(subHeading2);
subHeading2.innerHTML = `Author: ${info[key].author}`;
}
// loop over bookCovers object and display the corresponding book cover for each li
// for (const key of Object.keys(images)) {

// }
};

// generate page
Expand Down