Build a Loan Qualification Checker - Step 3

Hey guys,

Here is my function:

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

}

The code checker throws the following:

Your getLoanMessage function should return a string.

Doesn’t the return "You qualify for a duplex, condo, and car loan."' line meet this requirement.

Works for me. Did you inadvertently change any other code there?

Thanks for chipping in. Nope, I didn’t. I copy-pasted it. Here is its screenshot if it help:

I copied your code for that step exactly as you have it there, and it passed the tests.

Try the following, please:

Click on the “Restart Step” button and force a refresh of your page with CTRL + F5 then try to paste the code in again.

or - Try the step in incognito or private mode.

or - Disable any/all extensions that interface with the freeCodeCamp website (such as Dark Mode, Ad Blockers, or Spellcheckers), and set your browser zoom level to 100%. Both of these factors can cause tests to fail erroneously.

or - Ensure your browser is up-to-date or try a different browser.

Hopefully, one of these actions will work for you.

Thank you very much. I am on it. Cheers!

For next time, please use the HELP button.

If you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Help button located on the challenge. This button only appears if you have tried to submit an answer at least three times.

The Help button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

1 Like

Bingo!

Wrapping up the two whole conditional with the () parenthesis did the job.

I do not understand what you changed

I wrapped the conditional within parenthesis.

I do not understand what you mean, there are already parenthesis

Apology. Forgot to mention I also did the Lesson 3 reset.

I must’ve recreated the conditional without parenthesis after the reset, failed the test, added them and that was that.

Hope this helps.

You guys have nothing to worry about. Appreciate your hard work.

Thanks a ton again for your prompt response.