How do you declare a 2 dimension array in Ruby. I know, V=[] is one dimensional. But v=[][] for 2 dimensional? And in a block I want to add values as subarrays in a array. i.e. V=[["ab","ba"],["12","21"]]. This is what I am doing. Let x=[]. I take each element, store the original as well as the reverse.
x.each{|k| l=k_reverse v=(k,l)}
A 2 dimensional array could possibly be initialized as