Build a Loan Qualification Checker - Step 3

Tell us what’s happening:

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

Challenge Information:

Build a Loan Qualification Checker - Step 3

Hi. The instructions did not ask you to add an else statement or to add more parameters to the function.

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.

you did not share your updated code so we are unable to advice

function getLoanMessage(annualIncome, creditScore) {

  if (annualIncome >= minIncomeForDuplex && creditScore >= minCreditScoreForDuplex) {

    return "You qualify for a duplex, condo, and car loan.";

  }

    return undefined;

}

here it is

do you still have the 6 variables declared at the top?

No, they’re not there.

I reset the lesson and it worked thank you!