Ruby - Operators and Expressions
You want to set a default value for a hash key only if it is missing or nil. Which code correctly uses ||= for this?
settings = { theme: nil }
settings[:theme] ||= "dark"
puts settings[:theme]