Advertisement
Kali_prasad

java script emi calc

Mar 9th, 2022
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*const _principalAmount = ;
  2. const _interestRateYear = ;
  3. const _tenureMonth = ;
  4. ;
  5. */
  6. function calculateEMI() {
  7.     const principalAmount = document.getElementById("principalAmount").value;
  8.     const interestRateYear = document.getElementById("interestRate").value;
  9.     const interestRateMonth = Number(interestRateYear / 1200);
  10.     const tenureMonth = document.getElementById("tenure").value;
  11.     const result = document.getElementById("result");
  12.     const emi=(P * R * (Math.pow((1 + R), N) / (Math.pow((1 + R), N) - 1)));
  13.    // const emi = getEmiReducing(principalAmount, tenureMonth, interestRateMonth);
  14.     result.innerHTML= "EMI is Rs." + emi;
  15.  
  16.    // return false;
  17. }
  18.  
  19. /*function getEmiReducing(P, N, R) {
  20.     return (;
  21. }*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement