Build a Loan Qualification Checker - Step 6

Tell us what’s happening:

Failing at Step 6. Not sure why as the syntax is the same for the previous two.

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) {
  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."
  } else if (annualIncome >= minIncomeForCar && creditScore >= minCreditScoreForCar) {
    return "You qualify for a car loan."

// User Editable Region

  } else if (annualIncome < minIncomeForCar && creditScore < minCreditScoreForCar) {
    return "You don't qualify for any loans."
  }
  }


// User Editable Region

}

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:146.0) Gecko/20100101 Firefox/146.0

Challenge Information:

Build a Loan Qualification Checker - Step 6

This error could mean there’s something not right with the number of braces in the code.

SyntaxError: unknown: Unexpected token (21:0)
  19 |   }
  20 |   }
> 21 | }
     | ^

If you look at the console, it leads you to the solution

Not sure why as the syntax is the same for the previous two.

It is possible in workshops that the basic code changes a bit when you go to the next step.
I understand it is sometimes confusing, that you can only work on the highlighted lines and thus harder to see the full code. Like here you can find more code lines under the submit box.

I understand why you made that curly brace, but look at the very bottom of your HTML code.

1 Like