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 trialDavid Besserman
3,963 Pointswhy "a" > "b" doesn't check is "a" is bigger than "b"
I can't understand why
"a" > "b"
doesn't work as you did in the video
Can you please helm me ?
6 Answers
Philip Benton
1,378 PointsVariables do not have quotations around them. "a" or "b" would be interpreted as strings which will throw and error.
Marc Biggar
10,942 PointsAre you using quotation marks "a" > "b", if so , remove them :
a > b
Asa Smith
10,009 PointsI had the same issue. The instructions tell you to check of the variable "a" is greater than "b". The video also shows checking the value of string "a" > string "b". Sort of confusing instruction.
David Besserman
3,963 Pointsthanks Marc. That worked. But why wasn't "a" > "b" working ? isn't "a" or "b" a variable ? Or is it a error in the question ?
saladspork
19,762 Pointsalso a>b (without spaces) doesn't work in the challenge but it is valid and works in irb? Should this not also pass?
Philip Bessa
5,396 PointsIt should pass, but generally it's not good form to type it without any spaces. It would be harder to read if there were a bunch of those crammed together in lines of code.