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

Evan Johnson
PLUS
Evan Johnson
Courses Plus Student 1,177 Points

I have a question on my coding challenge. Its very simple but for some reason it isn't working. It is in Ruby btw.

Write the Ruby Code to check if the variable "a" is greater than the variable "b". Now I've tried almost everything.

I've tried

a>b

b<a

"a">"b"

"b">"a"

i've tried assigning values to a and b and doing all of the above but it still doesnt work. is it bugged or am i missing something. ANY HELP would be appreciated. Thanks

2 Answers

Hi Evan,

You need to make space between a and b strings

a > b
Evan Johnson
PLUS
Evan Johnson
Courses Plus Student 1,177 Points

Thanks I'm, coming from c ++ where its not nessecary to make the space between the two strings. Also the instructor didnt mention it and he assumed it. But thanks!