
Logical Operator
Authored by Cherry Batistis
Information Technology (IT)
11th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
17 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 3 pts
What is the primary function of logical operators in JavaScript?
To combine or modify Boolean values, enabling more complex conditional decisions.
To loop through arrays.
To define new variables.
To perform arithmetic calculations.
2.
MULTIPLE CHOICE QUESTION
30 sec • 3 pts
Consider the expression (5 > 3 && 10 < 20). What will this expression evaluate to?
3
false
10
true
3.
MULTIPLE CHOICE QUESTION
30 sec • 3 pts
Which logical operator returns true only if all of its operands are true?
&& (AND)
|| (OR)
! (NOT)
?? (Nullish Coalescing)
4.
MULTIPLE CHOICE QUESTION
30 sec • 3 pts
Which logical operator returns true if at least one of its operands is true?
&& (AND)
! (NOT)
|| (OR)
=== (Strict Equality)
5.
MULTIPLE CHOICE QUESTION
30 sec • 3 pts
What will the expression (false || true || false) evaluate to?
false
true
null
undefined
6.
MULTIPLE CHOICE QUESTION
30 sec • 3 pts
Given let isRaining = true;, what will !isRaining evaluate to?
true
false
undefined
null
7.
MULTIPLE CHOICE QUESTION
30 sec • 3 pts
You want to check if a user is not logged in. If isLoggedIn is a boolean variable, which condition would you use?
if (isLoggedIn === false)
if (!isLoggedIn)
if (isLoggedIn == 0)
All of the above are equally common and readable.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?