Question 58

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

Consider the following statements respect to JavaScript : (I) A variable is created using the 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

Both statements are true as intended: in JavaScript a variable is created with the var keyword (the word is missing from the question), and JavaScript is loosely (dynamically) typed, so variables have no fixed type.

From DSSSB TGT Computer Science Practice Set 5

This is question 58 of DSSSB TGT Computer Science Practice Set 5. 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.