a ||= nil a ||= 0 a ||= 2 # a returns 0 # ||= conditional assignment if a is unassigned then it gets assigned # otherwise it remains with the value it has as per 2 and 3 lines