Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Ruby Ruby Basics (Retired) How Ruby Works Setting Variables

Femi Sutton
Femi Sutton
288 Points

the task ask Create the variable name and set it equal to your own name. and I put name = "Femi" so what did I do wrong

please help me understand the name variable

variable.rb
name = Femi
puts "hello"
Puts name

2 Answers

andren
andren
28,520 Points

Your name is a string, so it has to be wrapped in quote marks like this: "Ferni". You also spell puts with a capital P on your third line which is not valid.

If you wrap quotes around your name, and remove the puts lines since the task did not ask for them, like this:

name = "Femi"

Then your code will work.

Femi Sutton
Femi Sutton
288 Points

i had just figured it out, i appreciate you taking your time to help anyway