Skip to content
Prev Previous commit
Next Next commit
new update
  • Loading branch information
EliaYazdi committed Jul 31, 2019
commit f275389e7d2a7104840791703e04005e9e13e5ae
76 changes: 47 additions & 29 deletions Week1/homework/app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//make an array

const bookList = [
/*const bookList = [
'elia1',
'elia2',
'elia3',
Expand All @@ -20,65 +20,83 @@ const bookList = [

//make an object containing info

const bookInfo = {
elia1: {
let ul = document.createElement('ul');
document.getElementById('books').appendChild(ul);

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

const bookInfo = [{

name: 'Elia 1',
Author: 'Elia the Famouse',
Language: 'English',
img: 'eli.jpg',

},
elia2: {
name: 'Elia 1',
{
name: 'Elia 2',
Author: 'Elia the Famouse',
Language: 'English',
img: 'eli.jpg',
},
elia3: {
name: 'Elia 1',
{
name: 'Elia 3',
Author: 'Elia the Famouse',
Language: 'English',
img: 'eli.jpg',
},
elia4: {
name: 'Elia 1',
{
name: 'Elia 4',
Author: 'Elia the Famouse',
Language: 'English',
img: 'eli.jpg',
},
elia5: {
name: 'Elia 1',
{
name: 'Elia 5',
Author: 'Elia the Famouse',
Language: 'English',
img: 'eli.jpg',
},
elia6: {
name: 'Elia 1',
{
name: 'Elia 6',
Author: 'Elia the Famouse',
Language: 'English',
img: 'eli.jpg',
},

elia7: {
name: 'Elia 1',
{
name: 'Elia 7',
Author: 'Elia the Famouse',
Language: 'English',
img: 'eli.jpg',
},
elia8: {
name: 'Elia 1',
{
name: 'Elia 8',
Author: 'Elia the Famouse',
Language: 'English',
img: 'eli.jpg',
},
elia9: {
name: 'Elia 1',
{
name: 'Elia 9',
Author: 'Elia the Famouse',
Language: 'English',
img: 'eli.jpg',
},
elia1: {
name: 'Elia 1',
{
name: 'Elia 10',
Author: 'Elia the Famouse',
Language: 'English',
img: 'eli.jpg',
},
};

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;
bookInfo.forEach(info => {
let div = document.createElement('div');
document.getElementById('inf').appendChild(div);
div.innerHTML += info.name;
});
Binary file added Week1/homework/eli.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 15 additions & 1 deletion Week1/homework/index.html
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
<!-- replace this with your HTML content -->
<!DOCTYPE html>
<html>

<head>
<title>Elia Books</title>
</head>
<p id="books"></p>
<div id="inf"></div>

<body>
<script src="app.js">
</script>
</body>

</html>
13 changes: 4 additions & 9 deletions Week2/homework/maartjes-work.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

const monday = [
{
const monday = [{
name: 'Write a summary HTML/CSS',
duration: 180,
},
Expand All @@ -19,8 +18,7 @@ const monday = [
},
];

const tuesday = [
{
const tuesday = [{
name: 'Keep writing summary',
duration: 240,
},
Expand All @@ -45,10 +43,7 @@ const tuesday = [
const maartjesTasks = monday.concat(tuesday);
const maartjesHourlyRate = 20;

function computeEarnings(tasks, hourlyRate) {
// Replace this comment and the next line with your code
console.log(tasks, hourlyRate);
}


// eslint-disable-next-line no-unused-vars
const earnings = computeEarnings(maartjesTasks, maartjesHourlyRate);
Expand All @@ -62,4 +57,4 @@ module.exports = {
maartjesTasks,
maartjesHourlyRate,
computeEarnings,
};
};