Skip to content

Commit

Permalink
updated task 6
Browse files Browse the repository at this point in the history
  • Loading branch information
aj-grimmett committed May 14, 2020
1 parent d697bb4 commit 10a2992
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ For example, variableInterestRate(200000, 0.04, 30) should console.log:
var name = 'AJ'
function variableInterestRate(P , I , N){
for(let i = 0.02; i <=0.07 ; i+=0.005){
var monthlyRate = ((P * (I* Math.pow((1 + I) , N))) / (Math.pow(( 1 + I ) , N) - 1));
var monthlyRate = ((P * (I* Math.pow((i + I) , N))) / (Math.pow(( i + I ) , N) - i));
console.log((name) + ", with an interest rate of " + (i) + ", your monthly rate is " + (monthlyRate));};
}
variableInterestRate(200000, 0.04, 30);
Expand Down

0 comments on commit 10a2992

Please sign in to comment.