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 Operators and Control Structures Ruby Operators Less Than

Less than

I can't figure out why treehouse won't accept this answer. Here are the instructions "Use the less than operator to determine whether the variable 'b' is less than the variable 'a'". The error message says to "double check the order of the variables" I've tried switching the order a few ways and the error stills keeps coming up. Any ideas?

"b" < "a"

2 Answers

Emily Coltman
PLUS
Emily Coltman
Courses Plus Student 9,623 Points

You've got apostrophes round the variables, which I think turns them into strings - try writing b < a instead of "b" < "a"?

You guys were right. The apostrophes that ended them into strings and they wanted variables, so I just took out the apostrophes and it worked!

james south
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
james south
Front End Web Development Techdegree Graduate 33,258 Points

i don't know much about ruby but is your code comparing strings or variables? in other languages you are comparing the letter b to a, not variables called b and a.