Amortization Schedule for a loan using JS