I\'m trying to work on a script where the user inserts a monthly income and gets the future value with compound interest after 30 years. As it is now, I\'ve assigned some values
Also I found with this alternative:
function compoundInterest(principal, annual_rate, n_times, t_years) { return principal*(Math.pow(1 + annual_rate/n_times, n_times*t_years) - 1); }