Build a Loan Qualification Checker - Step 7

Tell us what’s happening:

is he asking to re-write as what wrote before in that step or what is he asking for cuz i`m confused

Now, it is time to test out your getLoanMessage function.

Use the table below to create 4 variables and their values:

Variable Name Value
duplexLoanMsg getLoanMessage(85000, 850)
condoLoanMsg getLoanMessage(65000, 690)
carLoanMsg getLoanMessage(45000, 660)
noLoanMsg getLoanMessage(25000, 550)

After that, log each variable to the console to see the messages.

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."
  } else {
    return "You don't qualify for any loans."
  }
}


// User Editable Region

const duplexLoanMsg = getLoanMessage(85000, 850);
function duplexLoanMsg() {

}
consol.log(duplexLoanMsg);
const condoLoanMsg = getLoanMessage(65000, 690);
function duplexLoanMsg() {

}
consol.log(condoLoanMsg);
const carLoanMsg = getLoanMessage(45000, 660);
function duplexLoanMsg() {

}
consol.log(carLoanMsg);
const noLoanMsg = getLoanMessage(25000, 550);
function duplexLoanMsg() {

}
consol.log(noLoanMsg);

// 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/144.0.0.0 Safari/537.36

Challenge Information:

Build a Loan Qualification Checker - Step 7

where it is asking to create a new function?

[mod edit - off-topic post removed]

Here you were asking for help with “Build a Loan Qualification Checker - Step 7”, if you need help for other things, create a topic for those other things please

my bad i had already issues with css labs too and forget about the topic here, i will make another topic for this issue, i`m sorry

Hi. I’ll delete your off-topic post above so you can create a new one for that. We can leave this topic open for you to pick up when you’re ready.