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 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,271 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.