Null-coalescing operator (??)
The ?? operator is called the null-coalescing operator. It returns the left-hand operand if the operand is not
null; otherwise it returns the right hand operand.
myNewValue = myValue ?? "other value";
Ternary operator (?:)
The conditional operator (?:) returns one of two values depending on the value of a Boolean expression.
condition ? first_expression : second_expression;
The condition must evaluate to true or
false. If condition is
first_expressionis evaluated and becomes the result. If condition is false,
second_expressionis evaluated and becomes the result.
classify = (input > 0) ? "positive" : "negative";