4. Creating the Frequencies Hash


#1

Unsure what I'm doing wrong here. Just trying to make the frequencies hash. The error code reads "Oops, try again. It looks like frequencies isn't a hash."

puts "Enter the text"
text = gets.chomp
words = text.split(" ")
frequencies = Hash.new(0)

Any help would be appreciated, I'm sure I'm overlooking something simple.

Thanks!


#2

Hey phantomsignal

Your code looks fine, and it even worked when I tried copy-pasting it into the same assignment

Could try to reset the code or refreshing the browser (Ctrl+F5), as I've seen that mentioned in other posts where people have similar issues


#3

Thank you. Refreshing seemed to work. Didn't see other posts mentioning for this lesson. Thank you for the help!