title: The 'upto' method in Ruby
body: <p>I'm learning Ruby, and there has been a bit of talk about the <code>upto</code> method in the book from which I am learning. I'm confused. What exactly does it do?</p>
  
  <p><strong>Example:</strong></p>
  
  <pre><code>grades = [88,99,73,56,87,64]
  sum = 0
  0.upto(grades.length - 1) do |loop_index|
      sum += grades[loop_index]
  end
  average = sum/grades.length
  puts average
  </code></pre>