DSSSB TGT CS Mock 03 – Question 166

Question:

In JavaScript, what is the output of console.log(typeof NaN, NaN === NaN);?
जावास्क्रिप्ट में console.log(typeof NaN, NaN === NaN); का आउटपुट क्या होता है?

Options:

  • number false
  • NaN true
  • undefined false
  • number true
  • number false
  • NaN true
  • undefined false
  • number true

Correct Answer: a)

Explanation:

In JavaScript, according to IEEE 754, typeof NaN is 'number'. Additionally, NaN is the only value in JavaScript that is not equal to itself, so NaN === NaN evaluates to false.
जावास्क्रिप्ट में NaN का प्रकार number होता है, और IEEE 754 विनिर्देश के अनुसार NaN === NaN हमेशा false होता है।

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top