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

Level 5 lesson 5

define if with a break statement
by

2 Answers

sam5epi0l
Here is a possible solution:


let x = 0;

while(x < 10)
{
console.log(x);
if(x == 5) {
break;
}
x++;
}
ramakrishna1
let x = 0;

while(x < 10)
{
console.log(x);
if(x>4){
break;

}
x++;


}


why this is not working?

Login / Signup to Answer the Question.