Conditional operator is actually correct but somehow it became less common than ternary operator. I just preferred to follow the most popular way.
Thanks for the feedback :)
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.
This operator is called Conditional (ternary) operator in MDN: developer.mozilla.org/en-US/docs/W...
Conditional operator is actually correct but somehow it became less common than ternary operator. I just preferred to follow the most popular way.
Thanks for the feedback :)
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!