Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby Ruby Basics Ruby Syntax Variables

Im wondering why I cant use 2 puts in my code. Im struggling to figure out why I cant call description w/o a 2nd puts

So im not sure if I am grasping this properly. I believe I have made the right outline here, yet I cant use a second puts to call description to complete the challenge correctly.

variables.rb
language = "Ruby"
description = "awesome"

puts language
description

2 Answers

Michael Hulet
Michael Hulet
47,913 Points

You can use a single puts call to do this. Specifically, you can pass as many arguments as you want to puts, and it will print out each one. You just have to separate your arguments (in this case, language and description), with a comma (,)

OMG!!! that was so simple! Im used to JS where im outlining everything on one line. I had puts language, description and it was throwing errors.

I feel so stupid, thank you, Michael!