- script.js
JavaScript
var initialAmount = 50000;
var depositDuration = 12;
var simplePercent = 7;
var complexPercent = 6;
/* Technical assignment
Meow! I need a program to compare types of deposits. I specify deposit parameters in variables:
1. initialAmount is the initial deposit amount,
2. depositDuration is the deposit term in months,
3. simplePercent is interest rate for a deposit with simple interest,
4. complexPercent is the interest rate for a deposit with capitalization of interest.
The program should calculate the final deposit amount for deposits with simple and capitalized interest, and then save the recommendations in two variables:
1. recommendedType is the recommended type of deposit. Assign the 'simple' string to this variable if you recommend a simple deposit and 'compound' string if a deposit with a capitalization of interest is more profitable.
2. finalAmount is the final deposit amount.
*/