title: Ruby - How to print the actual index number of an array, not the value of that index
body: <p>got a simple question. </p>
  
  <p>I want to puts the index number of the array, not the actual value of the array index. So if array[0] = book1 I want to puts 0, not book1. How can I do this? </p>
  
  <p>More specifically if it's relevant, in my task I'm printing each album in the array in a loop, but also want to print which number each album is.</p>
  
  <pre class="lang-rb prettyprint-override"><code>index = 0
      while index &lt; albums.length
          print_album(albums[index])
          index += 1
      end
  </code></pre>