Which statement best describes the relationship between 'Undefined' and 'Null' in JavaScript?
A). Undefined and Null are interchangeable and can be used interchangeably in code.
B). Undefined and Null are distinct values representing different states in JavaScript.
C). Undefined is a subset of Null, encompassing all possible values of Null.
D). Null is a subset of Undefined, encompassing all possible values of Undefined.
How is 'Null' different from 'Undefined'?
A). Null represents variables that have been initialized but not declared.
B). Null represents an intentional absence of value or object reference.
C). Null is never used in programming.
D). Null is a substitute for 'Undefined'.
What is the result of the expression typeof undefinedVariable if undefinedVariable is not declared?
A). object
B). function
C). undefined
D). null
When does a variable typically have an 'Undefined' value?
A). When it is intentionally set to represent no value.
B). When it is assigned a default value.
C). When it is declared but not initialized.
D). When it is explicitly set to 'Undefined'.
Which of the following is an example of using 'Null' in JavaScript?
A). let user = null;
B). let user = undefined;
C). let user;
D). let user = '';
Which of the following is a valid use case for 'Null' in JavaScript?
A). Storing default values in variables.
B). Clearing or resetting object references.
C). Assigning placeholders in arrays.
D). Checking if a variable exists.
What does the expression null == undefined return in JavaScript?
A). 1
B). 0
C). undefined
D). null
How does the typeof operator behave when applied to an 'Undefined' value?
A). It returns 'undefined'.
B). It returns 'null'.
C). It throws an error.
D). It returns 'object'.
Which of the following correctly describes the purpose of 'Null' in JavaScript?
A). Null is used to represent an empty array.
B). Null is used to indicate that a variable is uninitialized.
C). Null is used to represent an intentional absence of value.
D). Null is used to check for object properties.
Which of the following statements is true regarding the behavior of 'Undefined' and 'Null' in JavaScript?
A). Undefined and Null are both falsy values in JavaScript.
B). Undefined and Null are both truthy values in JavaScript.
C). Undefined and Null have the same data type in JavaScript.
D). Undefined and Null cannot be compared in JavaScript.