DEV Community

Discussion on: The Ternary Operator

Collapse
 
jonrandy profile image
Jon Randy 🎖️ • Edited

Its name is actually the conditional operator. It just so happens that it is a ternary operator (an operator that has 3 operands, just has a binary operator has 2, and a unary operator has 1). As you say, JavaScript only has one operator like this, so it is sometimes referred to as 'the' ternary operator