0

i have an array like this

text_arr = ["hello","how","are","you"]

and i want to convert this to string like this

text = "hello how are you"

How can i do this with Ruby ?

1
  • Just do text_arr.join ' ' Commented Jan 12, 2017 at 8:58

1 Answer 1

3

Try this one

text = text_arr.join(' ')
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.