Question 73

Consider the following statements respect to JavaScript : (I) A variable is created using the var keyword.

Consider the following statements respect to JavaScript : (I) A variable is created using the var keyword. (II) JavaScript is untyped language. Which of the above are true ?
  1. ANeither (I) not (II)
  2. B(I) only
  3. C(II) only
  4. DBoth (I) and (II)
Show answerHide answer

Correct answer: (D) Both (I) and (II)

Explanation

JavaScript variables can be declared with var, and JavaScript is untyped (dynamically typed), so the same variable can hold any type. Both statements are true.

From DSSSB TGT Computer Science Practice Set 3

This is question 73 of DSSSB TGT Computer Science Practice Set 3. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.