Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on May 14, 2024. It is now read-only.

Conversation

@WardMad
Copy link

@WardMad WardMad commented Jul 29, 2018

No description provided.

Copy link

@harditsingh harditsingh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You did a good job, the code works well and is well formatted. I have some comments though, please see below. Best of luck!


const tasks = monday.concat(tuesday);
const tasks = monday.concat(tuesday)
let minutesToHours = tasks.filter(a => a.duration >= 120).map(h => h.duration / 60);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mixed up the order of first 2 steps here. While that does not matter much in this case, you should read the instructions carefully.

// Add your code here
console.log(minutesToHours);

let perHour = minutesToHours.map(v => v * 23) // per hour 23 euro

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should always have meaningful names for the variables, 'v' is not an intuitive name.


console.log(perHour);

let total = perHour.reduce(function(a, b) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should have used '=>' function here instead of 'function()', that's what the assignment mentioned.


// Add your code here

const newNumbers = numbers.filter(w => w % 2 !== 0).map(x => x * 2);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another example of non-intuitive naming :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.