Mein HTML -Code: < /p>
Code: Select all
Initial investment:
Interest rate:
%
Time period
Years
Months
Calculate
< /code>
Mein JS -Code < /p>
function calculate(P,r,months) {
for(i=0; i< months; i++){
cashBack = P * Math.pow( 1 + r/100, months)
P = cashBack
console.log(cashBack);
}
}
Mobile version