title: Ruby | Loop to show variables basted on number
body: <p>For 20 minutes, i'm figuring out how to show variables based on the loop his current number, but i can't manage to figure it out.</p>
  
  <p>I got it to work with a string, but not with a variable.</p>
  
  <pre><code>foo1 = 'one'
  
  foo2 = 'two'
  
  foo3 = 'three'
  
  foo4 = 'four'
  
  foo5 = 'five'
  
  foo6 = 'six'
  
  foo7 = 'seven'
  
  foo8 = 'eight'
  
  foo9 = 'nine'
  
  foo10 = 'ten'
  
  10.times do |n|
    n+=1
    puts foo{n}
  end
  </code></pre>
  
  <p>The code needs to do this:</p>
  
  <pre><code>puts foo1 + "\n" + foo2 + "\n" + foo3 + "\n" + foo4 + "\n" + foo5 + "\n" + foo6 + "\n" + foo7 + "\n" + foo8 + "\n" + foo9 + "\n" + foo10 + "\n" 
  </code></pre>