I initialize an array this way:
array = Array.new array << \'1\' << \'2\' << \'3\'
Is it possible to do that in one s
You can simply do this with %w notation in ruby arrays.
%w
array = %w(1 2 3)
It will add the array values 1,2,3 to the arrayand print out the output as ["1", "2", "3"]
["1", "2", "3"]