Last active
June 9, 2016 12:48
-
-
Save marcusshepp/ebdff100fbc997cc69231001fa3122e0 to your computer and use it in GitHub Desktop.
Ampersand Equal
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
a, b = 1, 2 | |
a &= b | |
# is the same as | |
a = a & b | |
# does a bitwise `and` | |
x = true | |
# => true | |
x &= true | |
# => true | |
x | |
# => true | |
x &= false | |
# => false | |
x | |
# => false | |
x &= true | |
# => false | |
x | |
# => false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment