Question: getEmployeesByManager(manager) Function This function will provide an array of employee objects whose employeeManagerNum property matches the department parameter (ie: if manager is 14 then the

getEmployeesByManager(manager) Function

  • This function will provide an array of "employee" objects whose employeeManagerNum property matches the department parameter (ie: if manager is 14 then the array will consist of only employees who are managed by employee 14 ) 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".

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

getEmployeeByNum(num) Function

  • This function will provide a single of "employee" object whose employeeNum property matches the num parameter (ie: if num is 261 then the "employee" object returned will be "Glenine Focke" ) 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!