Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions