5. Iterating over the array


#1

your code doesn’t look quite right, please check the hint… What’s wrong?

puts "Type your word: "
puts = gets.chomp

words = text.split(" ")
frequencies = Hash.new(0)
words.each { |word| frequencies[word] += 1  }


#2

puts =
Don’t do this, never do this
Name it almost anything else


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.