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
Comment out unused array and function
  • Loading branch information
nuanprae committed Feb 19, 2021
commit 791b986e675f5fe7d818fe7dd75ca7253b730b2f
42 changes: 21 additions & 21 deletions Week1/homework/app.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
'use strict';

{
const bookTitles = [
'the_capture',
'the_journey',
'the_siege',
'the_shattering',
'the_burning',
'the_hatchling',
'the_outcast',
'the_first_collier',
'the_coming_of_hoole',
'the_rescue',
];
// const bookTitles = [
// 'the_capture',
// 'the_journey',
// 'the_siege',
// 'the_shattering',
// 'the_burning',
// 'the_hatchling',
// 'the_outcast',
// 'the_first_collier',
// 'the_coming_of_hoole',
// 'the_rescue',
// ];
const guardiansOfGahooleSeries = {
the_capture: {
title: 'The Capture',
Expand Down Expand Up @@ -79,15 +79,15 @@
};

// Make a function (or functions) that generate a ul with li elements for each book ID in the array using a for loop.
const generateLi = array => {
const ul = document.createElement('ul');
document.body.appendChild(ul);
for (const element of array) {
const li = document.createElement('li');
li.innerHTML = element;
ul.appendChild(li);
}
};
// const generateLi = array => {
// const ul = document.createElement('ul');
// document.body.appendChild(ul);
// for (const element of array) {
// const li = document.createElement('li');
// li.innerHTML = element;
// ul.appendChild(li);
// }
// };

const generateHeader = title => {
const header = document.createElement('h1');
Expand Down