Hey guys,
As fairly new Rubyist here – I am doing a few ruby challenges to
sharpen up my skills albeit I am having trouble refactoring an unless
statement.
Doing a full unless statement is sometimes too much. How can I refactor
the method below to use a single-line unless statement.
games = [“Super Mario Bros.”, “Contra”, “Metroid”, “Mega Man 2”]
unless games.empty?
puts “Games in your vast collection: #{games.count}”
end