Manipulating two arrays in ruby way


I have two arrays:

A = ["a", "b", "c", "d", ...]
B = ["1", "2", "3", "4", ...]

And I need to create new array C

C = ["a$1", "b$2", "c$3", "d$4", ...]

How so I do this in ruby way?


=> ["a$1", "b$2", "c$3", "d$4", "e$5"]

But you shouldn't use Capitals unless you intend to create a constant.


Rob Biedenharn

Check out the ruby docs for arrays and try it itself.

thank you so much!!