Quiz
comp ch5
Create a free account to finish this quiz
Save your progress and see your final score.
Already have an account? Sign in
Questions in this quiz (12)
1Which of the following is not a valid value for a boolean?
- Atrue
- Bfalse
- Cyes
- DThe above are all valid
2What symbol represents the and operator in JavaScript?
- AAND
- Band
- C&
- D&&
3What symbol represents the or operator in JavaScript?
- AOR
- Bor
- C|
- D| |
4After the following code runs, what is the value of isWeekend?
var isSaturday = true;
var isSunday = false;
var isWeekend = isSaturday || isSunday;- Atrue
- Bfalse
- C"isWeekend"
- D"isSaturday || isSunday"
5What is the proper way to compare if two values are equal in a boolean expression in JavaScript?
- A=
- B==
- CEQUALS
- DIS
6What is the proper operator for “not equals” in JavaScript?
- A=!
- B!=
- C~=
- DNOT EQUALS
7Determine whether the following expression would evaluate to true or false?
7 = 6 OR 8 ≥ 4- ATrue
- BFalse
8Determine whether the following expression would evaluate to true or false?
(9 ≠ 13 AND 12 < 4) OR 15 < 9- ATrue
- BFalse
9Which of the following Boolean expressions is equivalent to the expression?
a AND (b OR c)- A(a AND b) OR c
- B(a AND b) AND (a AND c)
- C(a AND b) OR (a AND c)
- D(b AND c) OR a
10Which of the following Boolean expressions is equivalent to the expression
(a OR b) AND NOT (c OR d)- A(a OR b) AND ((NOT c) OR (NOT d))
- B(a AND NOT (c OR d)) OR b
- C(a OR b) AND (NOT c) AND (NOT d)
- DNOT (a AND b) AND NOT (c OR d)
11How can we check if a variable num is even?
- Anum.isEven() will be true
- B(num % 2 == 0) will be true
- C(num % 2 == 0) will be false
- D(num / 2 == 0) will be true
12What kind of statement allows us to run a block code only if a certain condition is true?
- Aif statement
- Bbreak statement
- Celse statement
- Dfor loop
Information
- Description
- Quiz on comp ch5, created by David Berman on 02/12/2019.
- Author
- David Berman
- Language
- English
- Views
- 0
- Tags
- Rating
- No ratings yet Rate this quiz