Call concat method through string variable : concat « String « Ruby






Call concat method through string variable


h = "Hello, "
m = "myValue!"
h.concat(m)

 

Related examples in the same category

1.An alternative to << is the concat method (which does not allow you to chain)