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

Javascript Level 5 Lesson 6

let x = 0;

while (x < 10)
{
if(x == 5)
{
console.log(x);
x++;
continue;
}
}

Explain me the correct code I'm again stuck with this code.
by

1 Answer

kshitijrana14
Try this one
let x = 0;
while(x < 10)
{
if(x === 5){
x++;
continue;
}
console.log(x);
x++;
}

Login / Signup to Answer the Question.