What is a multi-dimensional Arrays : Multidimensional Arrays « Array « Ruby






What is a multi-dimensional Arrays


# A multidimensional array is an array of arrays. 
# You create such an array by giving array elements that are themselves arrays. 
# This is a two-dimensional array:

d2 = [ ["January", 2007],
       ["February", 2007],
       ["March", 2007] ]


# The array d2's elements are also arrays. 

 








Related examples in the same category

1.Combine three arrays to create multi-dimensional array
2.flatten a multi-demensional array
3.transpose a multi-demensional array
4.Size and elements in a two-dimensional array
5.Convert a two-dimensional array to a hash
6.Three dimensional array