diff --git a/code/module-03/m03-start/module03.ts b/code/module-03/m03-start/module03.ts index 5640072..cae443d 100644 --- a/code/module-03/m03-start/module03.ts +++ b/code/module-03/m03-start/module03.ts @@ -11,21 +11,21 @@ /* TODO: Update the calculateInterestOnlyLoanPayment function. */ -function calculateInterestOnlyLoanPayment(principle, interestRate) { +function calculateInterestOnlyLoanPayment(principal, interestRate) { // Calculates the monthly payment of an interest only loan let interest = interestRate / 1200; // Calculates the Monthly Interest Rate of the loan let payment; - payment = principle * interest; + payment = principal * interest; return 'The interest only loan payment is ' + payment.toFixed(2); } /* TODO: Update the calculateConventionalLoanPayment function. */ -function calculateConventionalLoanPayment(principle, interestRate, months) { +function calculateConventionalLoanPayment(principal, interestRate, months) { // Calculates the monthly payment of a conventional loan let interest = interestRate / 1200; // Calculates the Monthly Interest Rate of the loan let payment; - payment = principle * interest / (1 - (Math.pow(1 / (1 + interest), months))); + payment = principal * interest / (1 - (Math.pow(1 / (1 + interest), months))); return 'The conventional loan payment is ' + payment.toFixed(2); }