Sales Tax Calculator: Write a JavaScript program that calculates the sales tax a
ID: 3767051 • Letter: S
Question
Sales Tax Calculator: Write a JavaScript program that calculates the sales tax and total price of an item. Assume a sales tax rate of 8%, which means you will multiply the cost of the item by .08 in order to calculate the tax amount. Use prompt and parseFloat to ask the user to input the item's cost and convert it to a numeric format. Declare a variable salesTax and use the formula above to calculate the sales tax amount. Declare a variable totalCost, add the item's cost plus the sales tax amount, and store it in totalCost. Output the Item cost, tax amount, and total cost on separate lines in the form of a receipt.Explanation / Answer
program :
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.