Question: Using Javascript: Create a script that calculates an employee's salary. Use the prompt method to retrieve the number of hours and hourly rate from the
Using Javascript:
Create a script that calculates an employee's salary. Use the prompt method to retrieve the number of hours and hourly rate from the employee, and display the total salary by multiplying the two values. If the employee has worked more than 40 hours, then he/she should get paid 1.5 times the hourly rate for every hour over 40. For example, if an employee works 45 hours, that employee should receive overtime for five hours. Total Salary should be displayed in an alert box.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
