This is a simple program. Please write in in JavaScript. Thanks! 8. Compound Interest Calculate...

This is a simple program. Please write in in JavaScript. Thanks! 8. Compound Interest Calculate compound interest on an investment or savings. Using the compound interest formula, nt A=P(1+r/n) , calculate principal plus interest. Where, A = Accrued Amount (principal + interest) P = Principal Amount r = Annual Nominal Interest Rate as a decimal t = Time Involved in years, 0.5 years is calculated as 6 months, etc. n = number of compounding periods per unit t; at the END of each period Example 1: How much did or will you invest? (P): 1000 What is the interest rate? (r): 0.08 How many years did or will you invest? (t): 5 How many times is interest compounded each year? (n): 12 A = P*(1 + r/n)^(n*t) A = 1000*(1 + 0.08/12)^(5*12) A = 1489.85 After 5 years at 8% interest, you have accrued $1489.85.