is it possible to populate a hash using a for loop? : I want a hash that holds keys which are ints from 1 to 18.
Essentially, at the start I want the hash to look like this:

    myHash = Hash.new
    myHash[1] = "free"
    myHash[2] = "free"
    ...
    myHash[18] = "free"

But I want to know if there's a nicer way to do this, such as using a for loop?

something like:

    myHash = Hash.new
    for i in 1..18
    hash[i] = "free"

will this work or will it just create 18 keys called "i"? Sorry if this is obvious but I am a real beginner and haven't found any answer elsewhere

