Use the Array#join
method (the argument to join
is what to insert between the strings – in this case a space):
@arr.join(" ")
Use the Array#join
method (the argument to join
is what to insert between the strings – in this case a space):
@arr.join(" ")