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
Next Next commit
update
  • Loading branch information
EliaYazdi committed Jul 29, 2019
commit 6f4623735341fa6db2503479b6e3ee41340fe30c
91 changes: 82 additions & 9 deletions Week1/homework/app.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,84 @@
'use strict';
//make an array

{
const bookTitles = [
// Replace with your own book titles
'harry_potter_chamber_secrets',
];
const bookList = [
'elia1',
'elia2',
'elia3',
'elia4',
'elia5',
'elia6',
'elia7',
'elia7',
'elia8',
'elia9',
'elia10',
];

// Replace with your own code
console.log(bookTitles);
}
//console.log(bookList);

//creat UL

//make an object containing info

const bookInfo = {
elia1: {
name: 'Elia 1',
Author: 'Elia the Famouse',
Language: 'English',
},
elia2: {
name: 'Elia 1',
Author: 'Elia the Famouse',
Language: 'English',
},
elia3: {
name: 'Elia 1',
Author: 'Elia the Famouse',
Language: 'English',
},
elia4: {
name: 'Elia 1',
Author: 'Elia the Famouse',
Language: 'English',
},
elia5: {
name: 'Elia 1',
Author: 'Elia the Famouse',
Language: 'English',
},
elia6: {
name: 'Elia 1',
Author: 'Elia the Famouse',
Language: 'English',
},

elia7: {
name: 'Elia 1',
Author: 'Elia the Famouse',
Language: 'English',
},
elia8: {
name: 'Elia 1',
Author: 'Elia the Famouse',
Language: 'English',
},
elia9: {
name: 'Elia 1',
Author: 'Elia the Famouse',
Language: 'English',
},
elia1: {
name: 'Elia 1',
Author: 'Elia the Famouse',
Language: 'English',
},
};

let ul = document.createElement('ul');
document.getElementById('books').appendChild(ul);

bookList.forEach(function (book) {
let li = document.createElement('li');
ul.appendChild(li);
li.innerHTML += book;
});