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

Week2 #295

Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update maartjes-work.js
  • Loading branch information
ghifo authored May 9, 2019
commit 7d15291c7e929c06f729409a40e30cfd0deead43
5 changes: 2 additions & 3 deletions ghufran/maartjes-work.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,10 @@ const maartjesTasks = monday.concat(tuesday);
const maartjesHourlyRate = 20;

function computeEarnings(tasks, hourlyRate) {
const duration = tasks.map(task => {
// turn mins to hours
const hours = task.duration / 60;
const duration = tasks.map(task => task.duration / 60);
return { ...task, duration: hours };
});
};

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