Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN JAVA SCRIPT write code in this function that takes the salary amount as a parameter, and calculates the tax payable at a rate of

IN JAVA SCRIPT

write code in this function that takes the salary amount as a parameter, and calculates the tax payable at a rate of 30%. If the salary is over 45000 add an extra 5000 to the tax. Subtract the tax from the original salary to get the net salary amount.

The function should return an array containing the total amount of tax at index 0 and the net salary at index 1.

function workoutTax001(numSalary) {

//insert code here

//arrReturn needs declaring and populating

return arrReturn;

}

afterwards;

write code in this function to prompt a user to enter their salary. Call the workoutTax001 function from above to calculate the total tax and net salary. Display the results in an alert message to the user.

function calculateTax001() {

//DONT FORGET to call the function!!

}

//call the calcTax001 function to run it!

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_2

Step: 3

blur-text-image_3

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

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

Students also viewed these Databases questions

Question

present a sport brand personality model

Answered: 1 week ago