Yes, but your sentence refers to it as a conditional operator. It's called the "conditional operator" and it is a ternary operator because it takes 3 operands (similarly, binary operators take 2 operands, unary operators take one).
It is commonly referred to as the ternary operator because JS only has the one operator like this that takes 3 operands.
Yes, but your sentence refers to it as a conditional operator. It's called the "conditional operator" and it is a ternary operator because it takes 3 operands (similarly, binary operators take 2 operands, unary operators take one).
It is commonly referred to as the ternary operator because JS only has the one operator like this that takes 3 operands.
Updated! Thanks for the feedback!