Quiz
comp ch5
Crie uma conta grátis para terminar este quiz
Salve seu progresso e veja sua nota final.
Já tem uma conta? Inicie sessão
Perguntas do 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- AVerdadeiro
- BFalso
8Determine whether the following expression would evaluate to true or false?
(9 ≠ 13 AND 12 < 4) OR 15 < 9- AVerdadeiro
- BFalso
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
Informações
- Descrição
- Quiz sobre comp ch5, criado por David Berman em 02-12-2019.
- Autor
- David Berman
- Idioma
- English
- Visualizações
- 0
- Etiquetas
- Avaliação
- Ainda sem avaliações Avalie este quiz