Build a Loan Qualification Checker - Step 3

Tell us what’s happening:

I am receiving an error implying that my getLoanMessage function is not returning an undefined message. I have used console.log and it’s showing undefined. I have done resets but it still shows the error. Please help. Thank you

Your code so far

const minIncomeForDuplex = 60000;
const minCreditScoreForDuplex = 700;

const minIncomeForCondo = 45000;
const minCreditScoreForCondo = 680;

const minIncomeForCar = 30000;
const minCreditScoreForCar = 650;

function getLoanMessage(annualIncome, creditScore) {

// User Editable Region

  if (annualIncome >= minIncomeForDuplex ?? creditScore >= minCreditScoreForDuplex) {return "You qualify for a duplex, condo, and car loan."}

// User Editable Region

}
console.log(getLoanMessage(2, 3))

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36

Challenge Information:

Build a Loan Qualification Checker - Step 3

do yuou know what the ??operator is doing?

?? is not the way to write the “AND” requested for in the instructions

Oh yeah it’s a Nullish Coalescing Operator. Sorry for the trouble and Thanks!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.