Description
Code of Conduct
- I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
What part(s) of the article would you like to see updated?
GitHub offers ternary operator like behaviour that you can use in expressions. By using a ternary operator in this way,
In this example, we're using a ternary operator
This is simply not true. Furthermore, in the section above you don't even state which operators are unary and which are binary, but it certainly seems to be true that none of them are ternary. You also don't bother to state the order of operations, and then make use of exactly that order in the example. Are we to assume that the order you present the operators is the order? This seems a sensible order, but wouldn't it be worth adding a sentence to say so?
The ?:
operator common in many languages is simply one kind of ternary operator. It is so named because it operates on three variables/expressions. You are using two binary operators to try to mimic this functionality, but that is not the same as using a ternary operator.
Additional information
No response