Syntax of Ternary Operator 1

Syntax of Ternary Operator

 if  else 

Here is what the above code is Doing:
1. The if statement is checking if x is greater than y.
2. If x is greater than y, then x is assigned to z.
3. If x is not greater than y, then y is assigned to z.

Similar Posts