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

Lesson 4 level 5

We have a simple while loop in the editor, which is printing values 0 to 9. We want you to use the break statement, to break out of the loop after printing 5 in the console.

You will have to use if condition for this, we hope you remember how to use it. Please increment the value of x after the if condition, which means add the if condition between console.log() statement and the x++; statement, inside the while loop.


what will the correct code of this exercise? Can someone help me...??
by

2 Answers

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

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

Login / Signup to Answer the Question.