Please help me out with 6. Control Flow. I just cannot understand what's wrong and move ahead. Thanks


#1

https://www.codecademy.com/en/courses/learn-javascript/lessons/control-flow/exercises/logical-operators?action=lesson_resume


var moonPhase = 'full';
var foggyNight = false;
if (moonPhase === 'full' && foggyNight);


#2

Which step are you stuck at? You should show us all of your code.


#3

Yes, sorry.

Task 1:
var moonPhase;
var foggyNight = true;

Task 2:
var moonPhase = 'full'
var foggyNight = true;
if (moonPhase === 'full' && foggyNight);

In Task 3 I've been asked to change foggyNight to false which I did, however there's no error message in the console and it's not letting me move ahead

Here's my code in Task 3:

var moonPhase = 'full';
var foggyNight = false;
if (moonPhase === 'full' && foggyNight === false);

What might be an issue?


#4

I don't see your if/else statements from the previous exercise. I'm not sure it they matter, I haven't had time to test it yet. Just in case they do, you may wish to restore those.


#5

I have the same problem with task 6.
I can not continue to another task.
This code show me nothing.

Who can help me?
My code is:

var moonPhase = 'full';
var foggyNight = false;

if (moonPhase === 'full' && foggyNight === false) {

} else {

}


#6

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