You know the Drill


What is wrong with these codes please? Help me

puts " your text please"
text = gets.chomp
words = text.split
frequencies =
words.each do
{ |word|
frequencies[word] += 1}
puts frequencies[word]


Hi inside your each do its should be like...... and you don't need the "{ }"

words.each do |words|
frequencies[words] +=1
puts frequencies[words]


Thanks you very much mates. I tried and it perfectly works. Thank again