I can’t seem to figure out where the problem is.
The function should return a string, and the function should the string “You qualify for a duplex, condo and a car loan.”
Your code so far
// User Editable Region
function getLoanMessage(annualIncome, creditScore, minIncomeForDuplex, minCreditScore) {
if (annualIncome >= minIncomeForDuplex && creditScore >= minCreditScoreForDuplex) {
return "You qualify for a duplex, condo, and car loan.";
} else {
return undefined;
}
}
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36
Well, now I removed the else statement and extra parameters and now it says the following:
1. Your getLoanMessage function should return a string.
2. Your getLoanMessage function should return the string "You qualify for a duplex, condo, and car loan.".
3. Your getLoanMessage function should return undefined if the applicant's annual income and credit score do not meet the requirements for a duplex loan.
function getLoanMessage(annualIncome, creditScore) {
if (annualIncome >= minIncomeForDuplex && creditScore >= minCreditScoreForDuplex) {
return "You qualify for a duplex, condo, and car loan.";
}
return undefined;
}