Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The program must meet these criteria: Must follow the standards followed in earlier programs: include meaningful comments, is formatted in an easy - to -

The program must meet these criteria:
Must follow the standards followed in earlier
programs: include meaningful comments, is
formatted in an easy-to-read manner, uses strict
mode to enforce good coding practices. Variables
are initialized at the beginning. Uses "const" and
"let" correctly. It does not use "var" to initializeSolve this Problem
Write a JavaScript program that solves the following
problem:
Youie buys 3 items at the campus bookstore. A
backpack, a calculator, and a textbook.
The backpack costs $56.24. The calculator
costs $104.25. The textbook costs $51.26.
The bookstore charges 13% sales tax.
What is the subtotal amount for the 3 items?
What is the sales tax amount for the 3 items?
What is the total cost for the 3 items after the
sales tax is added to the subtotal?
variables. Variables are kept out of global scope by
compartmentalizing them inside functions.
Use document.getElementByld to read the prices of
the 3 elements from the DOM: back-price, calc-
price, and text-price.
Use the textContent property of the elements to
read the text contents from the 3 DOM elements.
Convert the text content from the 3 DOM elements
into numbers using the Number() method.
Calculate the sum of the item prices.
Calculate the amount of sales tax.
Calculate the total price.
Output the following information to the console
NEEDS TOBEIN SEPERATE FUNCTIONS
image text in transcribed

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

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

Data Mining Concepts And Techniques

Authors: Jiawei Han, Micheline Kamber, Jian Pei

3rd Edition

0123814790, 9780123814791

More Books

Students also viewed these Databases questions