Build a Loan Qualification Checker - Step 4

const minIncomeForDuplex = 60000;
const minCreditScoreForDuplex = 700;

const minIncomeForCondo = 45000;
const minCreditScoreForCondo = 680;

const minIncomeForCar = 30000;
const minCreditScoreForCar = 650;

function getLoanMessage(annualIncome, creditScore) {
if(creditScore >= minCreditScoreForDuplex && annualIncome >= minIncomeForDuplex) {
return “You qualify for a duplex, condo, and car loan.”
}
else if(annualIncome >= minIncomeForCondo && creditScore>= minCreditScoreForCondo)
{
return “You qualify for a condo and car loan.”}}
if(!getLoanMessage){
return “undefined”
}

Challenge Information:

Build a Loan Qualification Checker - Step 4

if(!getLoanMessage){
return “undefined”

Why have you added this?

Also check your closing brackets for your function and if statements to ensure there are no extra ones.

hello and welcome to fcc forum :slight_smile:

  • a syntax typo in that conditional scope, double check “closing curly brackets”

happy coding :slight_smile: