From f2109e5b77d8857a240d1bce8269f07ac7a52557 Mon Sep 17 00:00:00 2001 From: Shawn Kupfer <60445862+ShawnKupfer@users.noreply.github.com> Date: Mon, 28 Nov 2022 08:27:26 -0600 Subject: [PATCH] "Principal" misspelled "principle" should be "principal" to use the correct financial term and to match https://learn.microsoft.com/en-us/training/modules/typescript-implement-interfaces/6-interfaces-lab --- code/module-03/m03-start/module03.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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); }