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

Level 4, LESSON 8

let x = 10;
let y = 1;
let z;
// your code comes here
z = (x > y) ? x : y;
console.log("Value of z: " + z);


code not working
by

1 Answer

sam5epi0l
Hi Vikas, Below is correct code for this exercise.

(x > y)? z = x : z = y;

Login / Signup to Answer the Question.