JavaScript ternary if statement

I would like to know what's the shortcode of if in javascript?

Like in php:

$res = ($x > $y)? $x: $y;

What's its conversion in javascript?

5
задан msanford 2 August 2013 в 20:33
поделиться