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
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