JavaScript |Questions and Answers(A+ Solution guide)
Which of the following is NOT a valid value for a Boolean? - Yes What symbol represents the and operator in JavaScript? - && What symbol represents the or operator in JavaScript? - | | After the following code runs, what is the value of isWeekend? var isSaturday = true; var is Sunday = false; var isWeekend = isSaturday | | isSunday; - True What is the proper way to compare if two values are equal in a Boolean expression in JavaScript? - == What is the proper operator for "not equals" in JavaScript? - != What kind of statement allows us to run a block code only if a certain condition is true? - if statement What kind of statement allows us to run one block of code if one condition is true, and a separate block of code otherwise? - if/else statement How can we check if a variable num is even? - (num % 2 == 0) How many times will the following program print "hello"?
Written for
- Institution
- JavaScript
- Course
- JavaScript
Document information
- Uploaded on
- August 12, 2023
- Number of pages
- 4
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers