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!
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 Booleans Help! First if statement
I need some assistance putting up the framework for this challenge. I can fill in the blanks after that.
car_speed = 50 speed_limit = 45
There are a couple of ways you can write this syntax. One would be all on one line, something like:
method_name if condition_met
condition_met could be a comparison such as something being greater than something else. Take the two variables in this challenge -
speed_limit. You could compare those with a binary operator, perhaps?
Alternatively, you can structure this over more than one line. Something like:
if condition_met do_this end
Let me know if you need more - those are just a couple of hints.
saves you space when you have a lot to look over