Build a Logic Checker App - Step 11

Tell us what’s happening:

I am working on Step 11 of the Build a Logic Checker App workshop and need help with the conditional statement. I am trying to write an if statement that checks if the birthday variables are equal using strict equality and logs “Happy Birthday!” to the console, but the tests are failing. Here is my code so far:

let birthday1 = …;
let birthday2 = …;

if (birthday1 === birthday2) {
console.log(“Happy Birthday!”);
}

Your code so far

// User Editable Region
let hasDeveloperJob = true;

if (hasDeveloperJob) {
  console.log("Timmy is employed as a developer.");
}

let isTimmyAGamer = false;

if (isTimmyAGamer) {
  console.log("Timmy loves to play World of Warcraft.");
}

let timmyAge = 18;

if (timmyAge >= 16) {
  console.log("Timmy is old enough to drive.");
}
if (birthday1 === birthday2) {
  console.log("Happy Birthday!");
}
// 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/152.0.0.0 Safari/537.36

Challenge Information:

Build a Logic Checker App - Step 11

GitHub Link: freeCodeCamp/curriculum/challenges/english/blocks/workshop-logic-checker-app/690a3ad44874a928a2fe3077.md at main · freeCodeCamp/freeCodeCamp · GitHub

Welcome to the forum @ehk8712

Here is a comparison of the original code and your code.

The code in blue is the original code, the code in red is your code.
The code in magenta is the overlap.

  • It looks like you changed the way variables are declared.
  • You are not asked to include the fourth if statement.

Happy coding

the code automatically added to your post does not include the two variables birthday1 and birthday2 being declared, so you will need to add that for the if statement to work

for this step you do not need to do this tho