Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const _principalAmount = document.getElementById("principalAmount");
- const _interestRateYear = document.getElementById("interestRate");
- const _tenureMonth = document.getElementById("tenure");
- const _result = document.getElementById("result");
- function calculateEMI() {
- const principalAmount = Number(_principalAmount.value);
- const interestRateYear = Number(_interestRateYear.value);
- const interestRateMonth = Number(interestRateYear / 1200);
- const tenureMonth = Number(_tenureMonth.value);
- const emi = getEmiReducing(principalAmount, tenureMonth, interestRateMonth);
- _result.innerText = "EMI is Rs." + emi.toFixed(2);
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement