Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

LEVEL 4 > LESSON 1

var raining;

if(raining=true)
{
console.log("Stay at home!");
}
else
{
console.log("Go to Office!");
}

Output: Stay at home!

But it is showing
Provide the correct boolean value to the variable raining.
Pls help me with a executable code.
by

1 Answer

kshitijrana14
Try this one:

var raining=true;

if(raining)
{
console.log("Stay at home!");
}
else
{
console.log("Go to Office!");
}

Login / Signup to Answer the Question.