3. Controll flow Page 2 (2/11)


#1

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>

https://www.codecademy.com/courses/learn-javascript-control-flow/lessons/control-flow/exercises/if-else-statements?course_redirect=introduction-to-javascript

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>
Hello guys, it told me to Create a variable named isSoccerFan and set it equal to a boolean, based on your preference and I cannot find what I’m doing wrong any help please?

```

let isSoccerFan = true;
if (isSoccerFan === true) {
console.log (‘isSoccerFan’);
}

<do not remove the three backticks above>

#2

Hi @megaslayer20630,

May i know which step you had problem with? There are two instructions in 2/11.


Copied from that Lesson:

Instruction 1:
Create a variable named isSoccerFan and set it equal to a boolean, based on your preference.

Your code:

let isSoccerFan = true;

is correct :white_check_mark:


Instruction 2:
Write an if/else statement that uses isSoccerFan as its condition. If it is true, then log, Goal!. If it is false, then log, No goal!.

You’re half way correct with your code, just need to finish it up with the console.log(.......) and also the else part according to the instruction above.

if (isSoccerFan === true) {
 console.log (...//what should be in here? Refer the instruction what should be logged?....);
} else {
 ...............//what should be in here? Refer the instruction.........
}

Hope this helps. Cheers :slight_smile:


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.