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

I'm stuck at lesson 8 in level 4 of javascript

I'm just stuck at Ternary Operator of javascript.
i tried every possible way to solve that but i can not
by

3 Answers

Bikram5c5hi
HI, are you talking about the ternary operator exercise? If yes:

Well I was stuck at this same exercise for a while, in line 5 I added:
(x > y)? z=x : z=y
and in line 6:
console.log("Value of z:"+z);
this gave me the correct result in the console on RHS, yet on submit the solution was not being accepted.
after a while of wasting time I realized that I missed the ; at line 5.. So the corrected one looked like:
(x > y)? z=x : z=y;
and this time the solution was accepted!

Hope this helps!
Ankushjx3bz
I'm stuck again here. Could you please help me again
LEVEL5 > LESSON 6
The continue Statement
I have tried many possible way to solve this but i am not getting succeed this lesson.
Preethigtlg5
For level 5 > lesson 6, Try this
let x = 0;

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

Hope this helps !!

Login / Signup to Answer the Question.