Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Make a JavaScript code to the given input, process, and output below. DO NOT use the IF ELSE statement to handle decision-making operations. Instead, just

Make a JavaScript code to the given input, process, and output below. DO NOT use the IF ELSE statement to handle decision-making operations. Instead, just use Ternary Operators to perform them. Take note that the program shall be able to run in a browser. DO NOT use an external JavaScript file for this assignment. Use an in-file JavaScript coding method

imageimage

Inputs: Name of employee Designation Monthly gross salary Process: Life Insurance = if gross salary is below 30,000.00 then 2.5% of gross salary else 7.5% of gross salary Withholding Tax = if Gross salary (PhP) below 30,000.00 between 30,000.00 and 50,000.00 then Tax due (Php) none 15% of gross salary 25% of gross salary more than 50,000.00 Housing Insurance = 1.5% of gross salary Health Insurance = if gross salary is below 30,000.00 then 150.00 else 200.00 Total Deductions = Life Insurance + Withholding Tax + Housing Insurance + Health Insurance Net Monthly Salary = Gross Monthly Salary - Total Deductions Output: Please see sample results in the screenshots.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Heres a JavaScript code snippet that follows the given specifications using ternary operators html E... 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

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions