How to make Ruby print on a new line

How to make Ruby print on a new line in a .each loop ?
I figured out how in a regular print statement, but not in a .each loop.

words.each { |word| print word }
words.each { |word| puts word }

That’s it. Thanks, it worked.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs