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
meir waizman13,827 Points
Why are you using one = instead of == when comparing in the if statement?
Pavel Fomchenkov20,897 Points
To be honest I never do it. Even the compiler complains about
Use of '=' in a boolean context, did you mean '=='?
Jason AndersTreehouse Moderator 145,841 Points
Could you post the example from the video? I just re-watched the video and did not see him using a (single) = except to assign values in the if/else statement. He did use
!= for a "Not equal to" comparison a couple times, however.
Anjali Pasupathy2,017 Points
Meir, are you referring to the previous video, with the introduction to if case statements? I've asked a similar question to yours under that video just now.