
Wyatt G. answered 12/12/20
Software Engineer and Architect Specializing in Ruby on Rails
&& and || are used for boolean logic. and and or are used for control flow.
Boolean logic example:
Control flow example:
and and or are rarely used in Ruby and you can get by with never using them if you wish.
For a fuller explanation, see Avdi Grimm's video on the subject: https://avdi.codes/how-to-use-rubys-english-andor-operators-without-going-nuts/