Here is the syntax for the ternary operator:
condition ? expression1 : expression2
The condition is evaluated first. If it is true, expression1 is executed. If the condition is false, expression2 is executed.
<script> let x = 30; let y = 50; let max = (x > y) ? x : y; console.log(max) </script>