Question 176

What does parseInt("12px") return in JavaScript?

  1. ANaN
  2. B"12"
  3. CError
  4. D12
Show answerHide answer

Correct answer: (D) 12

Explanation

parseInt reads leading digits and stops at the first non-digit.

From DSSSB TGT Computer Science Full Mock Test 3

This is question 176 of DSSSB TGT Computer Science Full Mock Test 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.