Question: Create a JavaScript program that uses a loop, conditional statements, and a function to complete the following: Using a loop, ask the user to enter
Create a JavaScript program that uses a loop, conditional statements, and a function to complete the following:
Using a loop, ask the user to enter the item name, price, and quantity for items.
Using a function, calculate the following:
Calculate the cost of each item and display the cost on the screen. price x quantity
Calculate the total cost of the three items and display the total cost on the screen.
Add a shipping charge at the end of the order based on the following conditions:
If the total cost is greater than or equal to $ the shipping charge is $
If the total cost is between $ and the shipping charge is $
Otherwise, the shipping charge is $
Display the shipping charge.
Calculate the grand total of the order which includes the total cost of the three items with the shipping charge and display it on the screen.
All the numbers should display with decimal places.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
