Iterating over the Array troubles


Hello, I'm getting the error: It looks like you haven't set the frequencies hash correctly.

And this is the hint: The action we want is to update the hash with a key equal to the word, then increment its value by 1. Each key will be frequencies[word], and we can increment using += 1.

What is my problem here?

puts "give me some text"
text = gets.chomp


frequencies =
frequencies ["cats"] = "dogs"

frequencies.each { |key| puts key}


Are you asking about 11. Iterating Over Arrays? If yes, here is my code if you want help with it...:slightly_smiling:

languages = ["HTML", "CSS", "JavaScript", "Python", "Ruby"]
languages = ["HTML", "CSS", "JavaScript", "Python", "Ruby"]
languages.each { |element| puts element }


I tried using this code and it still said that I didn't print it :confused: