Question: A. Modify example202.html file. (20 points) 1. Print out the initial balance, and allow user to type-in the name and the price of item the

 A. Modify example202.html file. (20 points) 1. Print out the initial

A. Modify example202.html file. (20 points)

1. Print out the initial balance, and allow user to type-in the name and the price of item the user want to buy by sing prompt() function.

2. When user does not have enough money to buy an item, the program will print out this message:

You want to buy a tv for $500 Your current balance is $300 You do NOT have enough money!! =========================

3. Add confirm() message to ask if user wants to continue shopping or not. If yes, user will be able to type-in item and price again. If not, the program ends.

Here are program outputs:

Your starting balance is $1000 ========================= You bought a tv for $300 Current balance is $700 ========================= You bought a tv for $400 Current balance is $300 ========================= You want to buy a tv for $500 Your current balance is $300 You do NOT have enough money!! =========================

example202.html 1 3

Divisible By Number

4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!