Ruby Ruby Basics Ruby Syntax Variables

Sam Toohey
Sam Toohey
1,187 Points

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
MOD
Michael Hulet
Treehouse Moderator 46,564 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 (,)

Sam Toohey
Sam Toohey
1,187 Points

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!