Loop through all values : each_value « Hash « Ruby






Loop through all values


zip = { 1 => "B", 2 => "A" }

zip.each_value { |value| print value, " " } 

 

Related examples in the same category

1.The each_value method passes all the values to a block