Question
JavaScript Please! Create a page called Interest.html . In it, use a prompt() to request a starting balance for a bank account. Then use a
JavaScript Please!
Create a page called Interest.html. In it, use a prompt() to request a starting balance for a bank account. Then use a loop to calculate interest earned on the account over 10 years, assuming 3% per year. The output should state the starting balance and interest earned for each year.
Sample output:
Note that your output does not need to be styled/formatted to match this screenshot; in particular, numbers don't need to be rounded to two decimal places. If you wish to try it, you can use .toFixed(2). For example:
console.write(someNumber.toFixed(2));
(A better way would be to use a LocaleString. Try Google for more information if you're curious--but it is optional).
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