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
John Fisher7,974 Points
Boolean Logic question
Can someone tell me why:
not true or true returns true
not true || true returns false?
Maciej Czuchnowski36,441 Points
It's a question of precedence. This should help you:
Do some experiments in IRB on your own to fully understand how precedence works in these cases (for example, use
! instead of
not in your two examples). This will be very useful once you start implementing it in your apps.