Code HS Test 2 questions with correct answers 2023/2024
Code HS Test 2 Which of the following is not a valid value for a Boolean? true false yes The above are all valid - correct answer yes Question: 1 What symbol represents the and operator in JavaScript? AND and & && - correct answer && What symbol represents the or operator in JavaScript? OR or | || - correct answer || After the following code runs, what is the value of isWeekend? var isSaturday = true; var isSunday = false; var isWeekend = isSaturday || isSunday; true false "isWeekend" "isSaturday || isSunday" ANSWERED - correct answer true What is the proper way to compare if two values are equal in a boolean expression in JavaScript? = == EQUALS is - correct answer == What is the proper operator for "not equals" in JavaScript? =! != ~= NOT EQUALS - correct answer != The AP Exam uses the following relational (comparison) operators: =, ≠, >, <, ≥, and ≤.As well, AND, OR and NOT are used instead of &&, || and !=. A comparison using a relational operator evaluates to a Boolean value. For example, a = b evaluates to true if a and b are equal; otherwise, it evaluates to false. Determine whether the following expression would evaluate to true or false. 7 = 6 OR 8 ≥ 4 false true - correct answer true - correct answer
Written for
- Institution
- WELL AP
- Course
- WELL AP
Document information
- Uploaded on
- November 23, 2023
- Number of pages
- 2
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
Also available in package deal