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 trialAbdulrahman 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