Question 25

Which of the following is not a valid variable name in JavaScript ?

  1. ANumber10
  2. B_myNumber
  3. C10Number
  4. Dmy_Number
Show answerHide answer

Correct answer: (C) 10Number

Explanation

JavaScript identifiers cannot start with a digit, so 10Number is invalid. Names can start with a letter, _ or $.

From DSSSB TGT Computer Science Practice Set 4

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