DEV Community

Sandeep kamboj
Sandeep kamboj

Posted on

Find Greatest Number Using Ternary Operator



var a=62;
var b=200;
var c=8;
var largestnumber = (a>b&&a>c?a:(b>a&&b>c?b:c));
alert(largestnumber);


Top comments (0)