I'm a noob programmer and am wondering how to create array names using a list of words from another array.
For example, I would like to take this array:
array = ['fruits','veggies']
and turn it into something like this:
fruits = []
veggies = []
What is the best way to do this in Ruby?
Here is my shot at it, where I failed miserably:
variables = ['awesome', 'fantastic', 'neato']
variables.each do |e|
e = []
e << [1, 2, 3]
end
puts neato