Welcome to the Treehouse Community
Looking to learn something new?
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,440 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.