You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project is a payroll-calculator, which should collect data and also return data.
The application will collect the name of an employee and their salary. The user has a chance to enter as many names and employee salaries as they would like.
In this project, I created an object to store employee data, called collectEmployees. I made this object into a method by adding a function that prompts the user to add their information. The data is kept in an array and is nested in a while loop to handle if the user wants to keep adding data.
!###
###
In this project, I added a function to calculate the average salary of all employees from the array. The program return the average in the console.
Finally, I added a function that will select a random employee and return that data in the console.