
Boolean Logic, Comparison Operators, and Loops Review Flashcard
Flashcard
•
Computers
•
10th Grade
•
Practice Problem
•
Easy
PATRICIA LAMMERT
Used 1+ times
FREE Resource
Student preview

26 questions
Show all answers
1.
FLASHCARD QUESTION
Front
What does the && (AND) operator return when both conditions are true?
Back
true
Answer explanation
The && (AND) operator returns true when both conditions are true. Since Michael and Harper will picnic only if the weather is sunny and they both have a day off, both conditions being true results in true.
2.
FLASHCARD QUESTION
Front
Zoe is deciding whether to go for a walk. She will only go if it is sunny and not raining. What is the result of it being sunny && raining?
Back
She will not go for a walk
Answer explanation
Zoe will not go for a walk because the condition requires it to be sunny and not raining. Since it is raining, the condition is not met.
3.
FLASHCARD QUESTION
Front
What is the result of !(true)?
Back
false
Answer explanation
The expression !(true) uses the logical NOT operator, which negates the value. Since true is being negated, the result is false. Therefore, the correct answer is false.
4.
FLASHCARD QUESTION
Front
What is the output of the following JavaScript code?
let x = 10;
console.log(x != 10);
Back
false
Answer explanation
The code checks if x (10) is not equal to 10 using the '!=' operator. Since 10 is equal to 10, the expression evaluates to false. Therefore, the output is false.
5.
FLASHCARD QUESTION
Front
What will console.log(5 > 3 && 8 < 10); print?
Back
true
Answer explanation
The expression '5 > 3' evaluates to true and '8 < 10' also evaluates to true. The '&&' operator requires both conditions to be true, so 'true && true' results in true. Therefore, console.log(5 > 3 && 8 < 10) prints true.
6.
FLASHCARD QUESTION
Front
In JavaScript, the expression 5 > 3 && 8 < 10 evaluates to ____.
Back
true
Answer explanation
The expression 5 > 3 evaluates to true and 8 < 10 also evaluates to true. Since both conditions are true, the entire expression 5 > 3 && 8 < 10 evaluates to true.
7.
FLASHCARD QUESTION
Front
The correct syntax for an if statement in JavaScript is ____.
Back
if (condition) {}
Answer explanation
The correct syntax for an if statement in JavaScript is B) if (condition) {}. This format uses parentheses to enclose the condition and curly braces to define the block of code that executes if the condition is true.
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?
Similar Resources on Wayground
27 questions
Lesson 5 Flashcards
Flashcard
•
11th Grade
20 questions
Atomic structure
Flashcard
•
9th Grade
20 questions
Irregular Verbs
Flashcard
•
9th Grade
21 questions
LOGARYTMY
Flashcard
•
9th Grade
22 questions
Auckland Attacked: Colonial government and military key terms
Flashcard
•
9th Grade
21 questions
Environmental Awareness and Global Warming
Flashcard
•
KG
18 questions
Ecology Concepts
Flashcard
•
10th Grade
20 questions
CAUTION, NOTICE, WARNING
Flashcard
•
8th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
10 questions
Probability Practice
Quiz
•
4th Grade
15 questions
Probability on Number LIne
Quiz
•
4th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
6 questions
Appropriate Chromebook Usage
Lesson
•
7th Grade
10 questions
Greek Bases tele and phon
Quiz
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
14 questions
[AP CSP] JavaScript Programming Quiz
Quiz
•
9th - 12th Grade
10 questions
Understanding Computers and Computer Engineering
Interactive video
•
7th - 12th Grade
37 questions
Python - Tuples, Lists, and List Methods
Quiz
•
9th - 12th Grade