Question: Javascript , node.js question getEmployeesByStatus(status) Function This function will provide an array of employee objects whose status property matches the status parameter (ie: if status

Javascript , node.js question

getEmployeesByStatus(status) Function

  • This function will provide an array of "employee" objects whose status property matches the status parameter (ie: if status is "Full Time" then the array will consist of only "Full Time" employees) using the resolve method of the returned promise.
  • If for some reason, the length of the array is 0 (no results returned), this function must invoke the reject method and pass a meaningful message, ie: "no results returned".

====================================================================================

getEmployeesByDepartment(department) Function

  • This function will provide an array of "employee" objects whose department property matches the department parameter (ie: if department is 5 then the array will consist of only employees who belong to department 5 ) using the resolve method of the returned promise.
  • If for some reason, the length of the array is 0 (no results returned), this function must invoke the reject method and pass a meaningful message, ie: "no results returned".

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!