Ternary Operator(JavaScript)

The ternary operator in JavaScript, also known as the conditional operator, is used to select one of two expressions based on a condition.