title: How do I populate an array with random numbers?
body: <p>I am trying to populate an array of four elements with positive integers that are less than 9.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>generated_number=Array.new(4)#create empty array of size 4
  generated_number.each do |random| #for each position in the array create a random number
    random=rand(10)
  end
  puts generated_number
  </code></pre>
  
  <p>I don't understand what I'm missing.</p>