Created
January 12, 2018 01:56
-
-
Save anonymous/9593113c3a4323692676d44f5adaa9c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Expression | Left-Associative | LA Result | Right-Associative | RA Result | Expected result | Conclusion | |
---|---|---|---|---|---|---|---|
1 == 1 == true | (1 == 1) == true | true | 1 == (1 == true) | false | ?? | Which one is right? | |
1 - 2 - 3 | (1 - 2) - 3 | -4 | 1 - (2 - 3) | 2 | -4 | LA is ok | |
1 + 2 + 3 | (1 + 2) + 3 | 6 | 1 + (2 + 3) | 6 | +6 | Both LA and RA is ok |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment