Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solution(dataArray) {
- let [principalSum, interestRatePercent, periodInMonths, timeSpanInYears] = dataArray;
- let compoundInterest = principalSum * Math.pow(1 + interestRatePercent/(100*( 12/periodInMonths)), 12/periodInMonths * timeSpanInYears);
- console.log(compoundInterest);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement