File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,3 +45,31 @@ const tuesday = [
4545const 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!" ) ;
You can’t perform that action at this time.
0 commit comments