This repository was archived by the owner on May 14, 2024. It is now read-only.
Closed
Conversation
harditsingh
reviewed
Aug 1, 2018
harditsingh
left a comment
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
Another example of non-intuitive naming :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.