1 || 2 && nil : Binary number « Number « Ruby






1 || 2 && nil


puts 1 || 2 && nil     # => 1

 

Related examples in the same category

1.Binary number with 0b
2.Binary bit shift left and right
3.Bit and, or