Help with Control Flow in Ruby?


#1

I'm super confused with this lesson... Can someone explain the | | (or) operator? And how exactly I should use it?


#2

I can give you an general example which should work for most programming languages.
|| (OR) operator
&& (AND) operator
if you have x = 1

if(x == 0 || x == 1) //returns true
if(x == 1 || x == 1) //returns true
if(x == 0 || x == 0) //returns false

if(x == 0 && x == 1) //returns false
if(x == 1 && x == 1) //returns true
if(x == 0 && x == 0) //returns false

#3

:open_mouth: This is great! Thanks so much!!!