# use a block with new, populating each element with what the block evaluates to num = Array.new(10) { |e| e = e * 2 }