Question: Create a JavaScript file named as your student ID (101010101.js) and perform the followings: Create a variable that contains the first four digits of your

Create a JavaScript file named as your student ID (101010101.js) and perform the followings:

Create a variable that contains the first four digits of your student ID as number (this will represent users account balance)

Output users account balance on the screen (in the h3 element created above)

i.e: Your account balance is: $1010 (10%)

Prompt user to enter one of the following options: (2 or d or D, 3 or w or W) (10%)

If (2 or d or D) is entered? --- user would like to do a deposit (20%)

prompt user to enter the amount they would like to deposit:

If a valid number, greater than zero is entered, add that to the original account balance and display new balance on the screen (in h3 element created above)

i.e: User enters 5.75 you would display: Your current balance is: $1015.75

Otherwise (invalid value is entered), display following message in an alert dialog box:

You did not enter a valid number!

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!