Skip to content

Conversation

Berihugebre
Copy link

@segersrobbert sorry for submitting let

let greaterThanTwoHours = changeToHours.filter((elem) => elem > 2);
let bills = greaterThanTwoHours.map((elem) => elem * hourlyRate);
let totalBill = bills.reduce((acc, elem) => acc + elem);
return totalBill;
Copy link
Owner

Choose a reason for hiding this comment

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

you can chain these operators together, but you made intermittent variables, with good variable names. Nice!

Copy link
Author

Choose a reason for hiding this comment

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

chained ! thank you.

Copy link
Owner

@bitsagarob bitsagarob left a comment

Choose a reason for hiding this comment

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

Included free code camp exercises! Very nice, good work!

@bitsagarob bitsagarob added the week2 Homework for week 2 label Jul 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
week2 Homework for week 2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants