Question: JavaScript program that prompts the user to enter an annual gross salary amount. It should then use the below criteria to calculate the tax and
- JavaScript program that prompts the user to enter an annual gross salary amount. It should then use the below criteria to calculate the tax and display the entered gross salary along with the calculated tax and the net salary (gross salary minus the tax) in an alert box.
Tax is 10% of the salary for salaries greater than zero and less than or equal to 40000
Tax is 15% of the salary for salaries greater than 40000 and less than or equal to 100000.
Tax is 25% of the salary for salaries greater than 100000.
For salaries less than or equal to 0 the program should display"Invalid Input" in the alert box
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
