Thanks. I’m very new to this so I really appreciate the help.
The exercise prompts you to use the .key() method and a while loop that
will iterate over the hash’s keys, copying over the values from the
array. I don’t think its the best way to do it but I think they want to
test these skills.
I got this far (see below) but realise that I don’t know how to copy the
values from the array into the hash.
index = 0
while index < hash.count()
puts “#{hash.keys}: #{array}”
index += 1
end
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.