Basic And Variables - Study Mode
[#21] When an empty statement is encountered, a JavaScript interpreter
Correct Answer
(A) Ignores the statement
Explanation
Solution: The JavaScript interpreter takes no action when it executes an empty statement. The empty statement is occasionally useful when you want to create a loop that has an empty body.
[#22] The “var” and “function” are
Correct Answer
(B) Declaration statements
Explanation
Solution: The var and function are declaration statements—they declare or define variables and functions. These statements define identifiers (variable and function names) that can be used elsewhere in your program and assign values to those identifiers.
[#23] Consider the following statements switch( expression ) { statements } In the above switch syntax, the expression is compared with the case labels using which of the following operator(s) ?
Correct Answer
(D) ===
Explanation
Solution: When a switch executes, it computes the value of expression and then looks for a case label whose expression evaluates to the same value (where sameness is determined by the === operator).
[#24] The enumeration order becomes implementation dependent and non-interoperable if :
Correct Answer
(A) If the object inherits enumerable properties
[#25] JavaScript is invented by ________.
Correct Answer
(C) Brendan Eich