「Ruby」each()で要素を取得する
サンプルコード
citys = { Tokyo: 2001, Oosakay: 2002, Yokohama: 2003}
citys.each { |key, value| puts “#{key} => #{value}"}
Coding Changes the World
サンプルコード
citys = { Tokyo: 2001, Oosakay: 2002, Yokohama: 2003}
citys.each { |key, value| puts “#{key} => #{value}"}