This is the question i'm having trouble with. "Loop through the multi-dimensional Array and print out the full information of even items in the Array (ie the 2nd and 4th array in your multidimensional array)".I'm tasked with outputting all the data in the even numbered array which should be [1] [3], which would output all the information from array "derrick" & "andrew" only.
kristopher = ["kris", "palos hills", "708-200", "green"]
derrick = ["D-Rock", "New York", "773-933", "green"]
willie = ["William", "Humbolt Park", "773-987", "Black"]
andrew = ["drew", "northside", "773-123","blue"]
friends = [kristopher, derrick, willie, andrew]
friends.each do |arr|
print arr [0..4]
end
#Output
["kris", "palos hills", "708-200", "green"]["D-Rock", "New York", "773-933", "green"]["William", "Humbolt Park", "773-987", "Black"]["drew", "northside", "773-123", "blue"]