-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create Functions that Use This #13
base: master
Are you sure you want to change the base?
Create Functions that Use This #13
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use const
unless you HAVE to use let
let employeeList = employees.map((employee) => createEmployeeRecord(employee)) | ||
return employeeList |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let employeeList = employees.map((employee) => createEmployeeRecord(employee)) | |
return employeeList | |
return employees.map((employee) => createEmployeeRecord(employee)) |
let payRoll = employeeRecords.reduce((total, employeeRecord) => total + allWagesFor.call(employeeRecord), 0) | ||
|
||
return payRoll |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let payRoll = employeeRecords.reduce((total, employeeRecord) => total + allWagesFor.call(employeeRecord), 0) | |
return payRoll | |
return employeeRecords.reduce((total, employeeRecord) => total + allWagesFor.call(employeeRecord), 0) |
|
||
return srcArray.find((employeeRecord) => employeeRecord.firstName = firstNameString) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return srcArray.find((employeeRecord) => employeeRecord.firstName = firstNameString) | |
return srcArray.find((employeeRecord) => employeeRecord.firstName = firstNameString) |
Create function to create employee record. Create function to create an array of employee Records. Use this to and created functions for time in and time out events. Use this in creating function for getting hours worked. Create function using this an using helper function to calculate wages earned for a particular date. Create function using find to search an array for matching first name. Create function to calculate payroll that uses helper function allWagesFor which was given in the lab.