Logical Operator

Logical Operator

11th Grade

17 Qs

quiz-placeholder

Similar activities

Kelas 9 - Halaman 23 (UH Bab 1)

Kelas 9 - Halaman 23 (UH Bab 1)

9th Grade - University

20 Qs

4.1 Kod Arahan

4.1 Kod Arahan

1st Grade - University

16 Qs

Bài 24

Bài 24

10th Grade - University

15 Qs

Scratch intro

Scratch intro

4th Grade - University

14 Qs

Mesin Pencari Artikel

Mesin Pencari Artikel

11th Grade - University

20 Qs

Selection Programming_If condition

Selection Programming_If condition

8th Grade - University

15 Qs

quiz1B1

quiz1B1

7th Grade - University

20 Qs

Video Game Programming and Design Questions

Video Game Programming and Design Questions

9th - 12th Grade

20 Qs

Logical Operator

Logical Operator

Assessment

Quiz

Information Technology (IT)

11th Grade

Medium

Created by

Cherry Batistis

Used 1+ times

FREE Resource

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.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?