title: "number" not a declared variable but still works?
body: <p>I'm learning ruby, I wrote out this code as part of a course, however on line 9 the variable <code>number</code> is introduced but isn't declared, the console doesn't throw up an error, why is this? is it specifically part of the <code>for</code> loop?</p>
  
  <pre><code>#set an array counting up from 1 - 5 
  the_count = [1, 2, 3, 4, 5]
  #array of fruits
  fruits = ['apples', 'oranges', 'pears', 'apricots']
  #mixed array of numbers and currency
  change = [1, 'pennies', 2, 'dimes', 3, 'quarters']
  
  # for each number in the_count array put... 
  for number in the_count
      puts "this is count #{number}"
  end
  
  #for each element in the fruit array put...
  fruits.each do |fruit|
      puts "a fruit of type: #{fruit}"
  end
  
  #iterate through each element in change and on each of them preceed its value with "i got"
  change.each {|i| puts "I got #{i}"}
  
  #create an empty array
  elements = []
  
  #interate through numbers 0 - 5 
  (0..5).each do |i|
      puts "adding to #{i} to the list."
  #push each number to empty array
      elements.push(i)
  end
  
  #iterate through each element in elements and preceed it with "Element was:"
  elements.each {|i| puts "Element was: #{i}"}
  </code></pre>