Build a simple mortgage calculator widget that takes in a loan amount, interest rate, loan term, and calculates the monthly mortgage payment, total payment amount, and total interest paid.
The last two requirements might not be given to you during interviews, you're expected to clarify.
The formula for calculating the monthly payment is:
M = P(i(1+i)n)/((1+i)n - 1)
Here's an example of Google's mortgage calculator (you might need to be in the US for it to appear):
This question is adapted from FrontendEval's Mortgage Calculator.
Build a simple mortgage calculator widget that takes in a loan amount, interest rate, loan term, and calculates the monthly mortgage payment, total payment amount, and total interest paid.
The last two requirements might not be given to you during interviews, you're expected to clarify.
The formula for calculating the monthly payment is:
M = P(i(1+i)n)/((1+i)n - 1)
Here's an example of Google's mortgage calculator (you might need to be in the US for it to appear):
This question is adapted from FrontendEval's Mortgage Calculator.
console.log()
statements will appear here.