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

How to solve Level- 4 --> Lesson- 8 (Ternary Operator) in JAVASCRIPT course ?

How to solve Level- 4 --> Lesson- 8 (Ternary Operator)* in *JAVASCRIPT course ?

I tried all the possible codes. My code is perfectly running. but its not submitting.
by

3 Answers

kshitijrana14
try this one
let x = 10;
let y = 1;
let z;
// your code comes here
(x > y)? z = x : z = y;
console.log("Value of z:" + z);
SaravananRajendran
Thanks bro ....
richard2022
@kshitijrana14

Having same issues again on this Level 4 lesson 8. Same code as you mentioned however system does not accept.

Login / Signup to Answer the Question.