Wednesday, 2 October 2013

Boolean expression in Ruby - difference betwen or and ||

Boolean expression in Ruby - difference betwen or and ||

Could someone please explain to me the differences of this two following
lines of code?
puts false or true or false or false or false
I don't understand why the result of the execution of that line suppose to
be different of:
puts false || true || false || false || false
I would be grateful if someone could explain that to me.

No comments:

Post a Comment