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 trialBen Gold
807 PointsProblem with Challenge Task 2 How do I assign the Boolean value of the comparison to constant isGreater?
I'm doing as follows for Task 2:
someOperation >= anotherOperation let isGreater = true
What am I doing wrong? I've tried other ideas.
2 Answers
Safwat Shenouda
12,362 PointsHi Ben,
You should do it like this: let isGreater = someOperation >= anotherOperation
The comparison between someOperation and anotherOperation will automatically result a Boolean value (true/false) that value is then assigned to isGreater constant.
Cheers, Safwat
Ben Gold
807 PointsHi Safwat,
Thanks for getting back to me! I actually figured it out in the meantime, but couldn't find my own post to let everyone know.
Lamar Greene
9,581 PointsLamar Greene
9,581 PointsPlease provide a link to the challenge, or post the original question and code snippet so there is detail/context of what the actual question is. (see the markdown cheatsheet below the "add comment" or "add an answer" section on how to post code snippets.)