Skip to content

Instantly share code, notes, and snippets.

@LolWalid
Created October 29, 2018 17:44
Show Gist options
  • Save LolWalid/a0b28a0f74672579475fee4ee7f50559 to your computer and use it in GitHub Desktop.
Save LolWalid/a0b28a0f74672579475fee4ee7f50559 to your computer and use it in GitHub Desktop.
Ruby && vs and
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