lundi 30 mai 2016

create array with elements form different arrays and different index for each one Ruby

How can i create 3 new arrays with elements form different arrays and different index for each one?

a = [1,2,3]
b = [:blue, :red, :yellow]
c = ["Tacos", "Burritos", "Chilli"]



new_array1 = [1,:yellow,"Tacos"]
new_array2 = [2,:rojo,"Burritos"]
new_array3 = [3,:blue,"Chilli"]

Aucun commentaire:

Enregistrer un commentaire