This section describes a comparison of the ternary statement to the if statement. a = (b > c) ? b : c; // The preceding line of code is equivalent to the following if-else code: if (b > c) { a = b; } else { a = c; }
This section describes a comparison of the ternary statement to the if statement. a = (b > c) ? b : c; // The preceding line of code is equivalent to the following if-else code: if (b > c) { a = b; } else { a = c; }