You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rewrite the above program using `map` and `filter` don't forget to use `=>`
52
+
53
+
2. Use the array of the previous assignment, write a program that add the even numbers to the resulting array twice, but the odd numbers only once. Don't forget to use `=>`.
Underneath you see a very interesting small insight in Maartje's work:
61
+
```js
62
+
let monday = [
63
+
{
64
+
name :'Write a summary HTML/CSS',
65
+
duration :180
66
+
},
67
+
{
68
+
name :'Some web development',
69
+
duration :120
70
+
},
71
+
{
72
+
name :'Try to convince teachers to fix homework class10',
73
+
duration :30
74
+
},
75
+
{
76
+
name :'Fix homework for class10 myself',
77
+
duration :20
78
+
},
79
+
{
80
+
name :'Talk to a lot of people',
81
+
duration :200
82
+
}
83
+
];
84
+
85
+
let tuesday = [
86
+
{
87
+
name :'Keep writing summery',
88
+
duration :240
89
+
},
90
+
{
91
+
name :'Some more web development',
92
+
duration :180
93
+
},
94
+
{
95
+
name :'Staring out the window',
96
+
duration :10
97
+
},
98
+
{
99
+
name :'Talk to a lot of people',
100
+
duration :200
101
+
},
102
+
{
103
+
name :'Look at application assignments new students',
104
+
duration :40
105
+
}
106
+
];
107
+
108
+
let tasks = [monday, tuesday];
109
+
```
110
+
111
+
3. Write a program that does the following:
112
+
113
+
- Collect two days' worth of tasks.
114
+
- Convert the task durations to hours, instead of minutes.
115
+
- Filter out everything that took two hours or more.
116
+
- Sum it all up.
117
+
- Multiply the result by a per-hour rate for billing (you can decide yourself what Maartje should make per hour).
118
+
- Output a formatted Euro amount.
119
+
- Don't forget to use `=>`
120
+
121
+
_BONUS_ : Code Kata Race
34
122
35
123
If you haven't already join our clan: "Hack Your Future" in codewars
36
124
@@ -48,8 +136,7 @@ _Hints_
48
136
49
137
Remember the person with the most kata points gets a prize from Gijs (and you can do exercises on this website without us assigning them - anything kyu 7 or kyu 8 you can try to do - kyu 6 or lower is probably too hard) -->
0 commit comments