I have this block of code:
super_heroes = [ ["Spider Man", "Peter Parker"], ["Deadpool", "Wade Wilson"], ["Wolverine", "James Howlett"] ] super_heroes.each do |sh| sh.each do |heroname, realname| puts "#{realname} is #{heroname}" end end The output is this:
is Spider Man is Peter Parker is Deadpool is Wade Wilson is Wolverine is James Howlett But I wanted to be this:
Peter Parker is Spider Man Deadpool is Wade Wilson Wolverine is James Howlett After hours of iterating the code, I still couldn't figure it out. I would appreciate if someone could put me in the right direction and explain what I'm doing wrong. Thanks!