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

The challenge is Level 4, lesson 8 of Javascript

/ I'm having problem solving this part
.......
/
let x = 10;
let y = 1;
let z;
// your code comes here
(x > y)
console.log("Value of z:");

//Kindly help.
by

1 Answer

iamabhishek
Here is the correct solution:

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


Hope it works for you.

Login / Signup to Answer the Question.