Skip to content

Instantly share code, notes, and snippets.

@davidedicillo
Created July 12, 2011 14:14
Show Gist options
  • Select an option

  • Save davidedicillo/1078066 to your computer and use it in GitHub Desktop.

Select an option

Save davidedicillo/1078066 to your computer and use it in GitHub Desktop.
dict_array = []
dict_hash = []
dict_array[0] = 'candle'
dict_array[1] = 'glasses'
dict_array[2] = 'truck'
dict_array[3] = 'Alicia'
dict_hash['shia-a'] = 'candle'
dict_hash['shaya'] = 'glasses'
dict_hash['shasha'] = 'truck'
dict_hash['sh-sha'] = 'Alicia'
dict_array.each do |word|
put word
end
dict_hash.each do |c_word, word|
puts "#{c_word}: #{word}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment