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
This will work for any case, note that period has a benchmark of 1 of a year so for instance every 6 months period = 2, 4 months period = 3 etc...
period
period = 2
period = 3
var init = 500000 var years = 30 var compound = 1 var interest = 3.99 var period= 2 var total = 0 function CInterest(){ for(let i=0; i