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?
It's the same in javascript :)
var res = (x > y) ? x : y;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With