Check for an Empty Array : empty « Array « Ruby






Check for an Empty Array

x = []
puts "x is empty" if x.empty?

 

Related examples in the same category

1.Loop through an array until empty