Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Abdulrahman Teima
1,091 Pointscan anybody help with this quiz?
I don't understand the quiz very well
2 Answers

Tadeáš Firich
7,866 PointsHello, yes it is basic for Boolean logic.
1)
What does this condition evaluate to: true or false?
( true && false )
it Equals 1 * (-1)
2)
Given the following code, what will appear in the browser's console?
var x = 10;
var y = 20;
if ( x < 10 && y > 10 ) {
console.log('The condition passes.');
} else {
console.log('The condition fails.');
}
The if means: is x smaller than 10 and is y higher than 10? No? so the program switch to the else.
3)
Complete the code below so that both conditions must be true for the alert message to appear:
if ( loggedIn === true
[ ]
level === 'admin') {
alert("Access granted.");
}
&& = and
|| = or
4)
What does this condition evaluate to: true or false?
( true || false )
This is what TeamTreeHouse told me: :D When using the OR operator only one of the conditions needs to be true.
Was it helpful for you? You can give me some points :)

Abdulrahman Teima
1,091 PointsThank you :)

Abdulrahman Teima
1,091 PointsThanks for your help :)
Abdulrahman Teima
1,091 PointsAbdulrahman Teima
1,091 PointsThe quiz is for Boolean logic