Ternary operator/conditional code example
Example 1: if statement shorthand c
if (true)
printf("This is the shorthand");
// OR
(true) ? (/*run if true*/) : (/*run if false*/);
Example 2: ternary operator
isMember ? '$2.00' : '$10.00'
// isMember true => output: "$2.00"
// isMember false => output: "$10.00"
// isMember null => output: "$10.00"