title: How to loop nested arrays in Ruby
body: <p>VERY new to Ruby and coding in general.  I'm trying to loop through two dimensional arrays but can't figure it out. Here's what I have:</p>
  
  <p>--Use a loop to print out each person on separate lines with their alter egos.</p>
  
  <p>--Bruce Wayne, a.k.a. Batman</p>
  
  <pre><code>people = [
    ["Bruce", "Wayne", "Batman"],
    ["Selina", "Kyle", "Catwoman"],
    ["Barbara", "Gordon", "Oracle"],
    ["Terry", "McGinnis", "Batman Beyond"]
  ]
  
  index = people[0][0]
  
  first_name = people[0][0]
  last_name = people[0][1]
  hero_name = people[0][2]
  
  4.times do
    puts first_name + " " + last_name + "," " " + "a.k.a" " " + hero_name
    index = index + 1
  end
  </code></pre>
  
  <p>It does print the first line but then raises an error:</p>
  
  <pre><code>Bruce Wayne, a.k.a Batman
  # `+': no implicit conversion of Integer into String (TypeError)
  </code></pre>