you can use the length method on hashes just as you can on arrays. : Hash Length « Hash « Ruby






you can use the length method on hashes just as you can on arrays.


pizza = {"first_topping" => "pepperoni", "second_topping" => "sausage"}
puts pizza.length

 

Related examples in the same category