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 trialOshedhe Munasinghe
8,108 PointsThis is wrong, or? (Logic Quiz: Age)
The question was : "Assuming age is set to 42, what is the value stored in the Boolean answer:"
"Boolean answer = (age (less than) 40 || age (greater than) 50); "
I answered True because (42 (less than) 40 is FALSE || 42 (greater than) 50 is TRUE ) So FALSE (OR) TRUE = TRUE.
But quiz answered False. Why? :S
Oshedhe Munasinghe
8,108 PointsARGHHH OFC!!!! XD I am so tired! thanks!! :) oh silly me
Oshedhe Munasinghe
8,108 PointsARGHHH OFC!!!! XD I am so tired! thanks!! :) oh silly me
1 Answer
Jeremiah Shore
31,168 PointsCopying the answer from Matthias J. since he replied in the comments, so you mark the question as answered.
@Matthias J.: "because 42 is NOT higher than 50 :)"
Matthias J.
20,355 PointsMatthias J.
20,355 Pointsbecause 42 is NOT higher than 50 :)