Challenge: Abstract Pattern
Explore how to implement the abstract pattern in JavaScript by designing a Loans constructor that dynamically creates HomeLoan, StudentLoan, or PersonalLoan objects. Understand how to use the getloan function to instantiate loans with distinct interest rates and calculate simple interest based on amount and duration.
We'll cover the following...
We'll cover the following...
Problem statement
In this challenge, you have the abstract constructor function Loans. There are three types of loans that can be given:
-
HomeLoan -
StudentLoan...