Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.

Commit dbd0e15

Browse files
authored
Update maartjes_work.js
1 parent d0464d7 commit dbd0e15

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Week2/homework/maartjes_work.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,31 @@ const tuesday = [
4545
const tasks = monday.concat(tuesday);
4646

4747
// Add your code here
48+
{ name: 'Write a summary HTML/CSS',
49+
duration: 180 },
50+
{ name: 'Some web development',
51+
duration: 120 },
52+
{ name: 'Fix homework for class10',
53+
duration: 20 },
54+
{ name: 'Talk to a lot of people',
55+
duration: 200 }
56+
];
57+
const tuesday = [
58+
{ name: 'Keep writing summary',
59+
duration: 240 },
60+
{ name: 'Some more web development',
61+
duration: 180 },
62+
{ name: 'Staring out the window',
63+
duration: 10 },
64+
{ name: 'Talk to a lot of people',
65+
duration: 200 },
66+
{ name: 'Look at application assignments new students',
67+
duration: 40 }
68+
];
69+
const tasks = monday.concat(tuesday);
70+
let twoDaysIncome = tasks
71+
.map(task => task.duration / 60)
72+
.filter(task => task >= 2)
73+
.map(total => total * 60)
74+
.reduce((a, b) => a + b, 0);
75+
console.log("Maartje earned " +twoDaysIncome+ ".00 Euro on Monday and Tuesday!");

0 commit comments

Comments
 (0)