Loan Repayment Calculator

$
Years
%
%
function computeLoan(){ const loanPriceInput = document.querySelector('#loanPriceInput').value; const loanInterestInput = document.querySelector('#loanInterestInput').value; const months = document.querySelector('#months').value; const loanInterestInput = (loanPriceInput * (loanInterestInput * 0.01)) / months; let payment = ((loanPriceInput / months) + loanInterestInput).toFixed(2); payment = payment.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); document.querySelector('#payment').innerHTML = `Monthly Payment = ${payment}` }