You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The whole point of the ternary operator ( var foo = condition ? val1 : val2) is to be succinct. In every language where it is used it is expressed in one line, otherwise the if/then/else makes more sense. This has been the case for at least 20 years.
What is the justification for recommending that ? and : be on separate lines?
The text was updated successfully, but these errors were encountered:
@gittycat the multiline ternary operator is still superior/different to if/then/else by allowing you to avoid duplicating a return or assignment statement. I understand that this is not everybody's cup of tea, that's why the README of this project clearly states that this is based on personal opinions and "You are encouraged to fork this repository and make adjustments according to your preferences.".
The whole point of the ternary operator ( var foo = condition ? val1 : val2) is to be succinct. In every language where it is used it is expressed in one line, otherwise the if/then/else makes more sense. This has been the case for at least 20 years.
What is the justification for recommending that ? and : be on separate lines?
The text was updated successfully, but these errors were encountered: