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

Commit 7d15291

Browse files
authored
Update maartjes-work.js
1 parent f383e8e commit 7d15291

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

ghufran/maartjes-work.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,10 @@ const maartjesTasks = monday.concat(tuesday);
4646
const maartjesHourlyRate = 20;
4747

4848
function computeEarnings(tasks, hourlyRate) {
49-
const duration = tasks.map(task => {
5049
// turn mins to hours
51-
const hours = task.duration / 60;
50+
const duration = tasks.map(task => task.duration / 60);
5251
return { ...task, duration: hours };
53-
});
52+
};
5453

5554
// remove less than 2 hours
5655
const filteredHour = duration.filter(elem => elem.duration >= 2);

0 commit comments

Comments
 (0)