Which operator is a ternary exactly? #37006
Labels
content
This issue or pull request belongs to the Docs Content team
help wanted
Anyone is welcome to open a pull request to fix this issue
Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#example
What part(s) of the article would you like to see updated?
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
The text was updated successfully, but these errors were encountered: