Created
October 29, 2018 17:44
-
-
Save LolWalid/a0b28a0f74672579475fee4ee7f50559 to your computer and use it in GitHub Desktop.
Ruby && vs and
This file contains hidden or 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
a = 1 | |
b = nil | |
c = a and b #(c = a) and b | |
=> c = 1 | |
c = a && b # c = (a && b) | |
=> c = nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment