First page Back Continue Last page Overview Graphics
Arrays und Hashtabellen
a = [:ein, :array]
b = {"eins"=>"one", :key=>:value}
b.each { |k,v| puts "#{k}: #{v}" }
b[:key] #-> :value
b.fetch("zwei") { |k| "#{k} gibt's nicht" }
#-> "zwei gibt's nicht"