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

I don't what do i m wrog in level 4 less 5

let myvehicle = "car";
let weather = "rainy";

if (weather === "rainy") {
if (myvehicle === "car") {
console.log("I go to the office");
} else if (myvehicle === "bike") {
console.log("I Work from home");
}
} else {
console.log("I go to the office");
}
by

1 Answer

sam5epi0l
Hello RajLakshmi, Try this else if block instead of else:


else if(weather != "rainy")
{
console.log("I go to the office");
}

Login / Signup to Answer the Question.