Question
question as the below code body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif } // Video Demonstration - https://youtu.be/9CH7_BiI_1A var totalAmount = 0; var
question as the below code
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif }
// Video Demonstration - https://youtu.be/9CH7_BiI_1A
var totalAmount = 0;
var items = "
Item | Item Cost |
// 2. Concatenate the value of Item Description into the table. Change item to the value of itemDescription
//items += "
items += "
items += "";
// Display items in element with id="listOfElements"
document.getElementById('listOfItems').innerHTML = items;
/// 3. Display totalAmount in element with id="totalAmountBeforeTax"
// 4. Calculate tax as 7% of total (totalAmount)
var taxAmount = 0;
// 5. Display tax in element with id="totalTax"
// 6. Display totalAmount + tax in element with id="totalAfterTax"
// 7. Display all currency values that are output to display 2 decimal places
// Hint: use toFixed()
document.getElementById('newItem').value = "";
document.getElementById('newAmount').value = "";
document.getElementById('newItem').focus();
}
Grocery List
Add Item
Description:
Amount:
Grocery Cart
Total
Total: $
Tax: $
Total with Tax: $
document.getElementById('newItem').focus();
there question or code need to be add inside the code as
# Follow these instructions in the html document
1. Add the value of newAmount to the running total totalAmount. Tip: Use parseFloat()
2. Concatenate the value of Item Description into the table. Change item to the value of itemDescription
3. Display totalAmount in element with id="totalAmountBeforeTax"
4. Calculate tax as 7% of total (totalAmount)
5. Display tax in element with id="totalTax"
6. Display totalAmount + tax in element with id="totalAfterTax"
7. Display all currency values that are output to display 2 decimal places
Hint: use toFixed()
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started