Q. The “var” and “function” are __________.
✅ Correct Answer: (D)
Declaration statements
Explanation:
var is used to declare variables.
- function is used to declare functions.
Both are declaration statements because they define variables and functions before execution.
Example:
var x = 10; // Variable declaration
function greet() { // Function declaration
console.log("Hello!");
}
Why Not Other Options?
- (A) Prototypes → Incorrect. Prototypes are used in object-oriented JavaScript but var and function are not prototypes.
- (B) Data types → Incorrect. var and function are not data types like string, number, etc.
- (C) Keywords → Partially correct, but they are mainly declaration statements, not just reserved words.