QuestenaՎարժանք, որը ցույց է տալիս՝ ինչ կրկնել հաջորդիվ
Հարց 14

Which strict-equality results are correct for NaN and the two signed zeros?

  1. NaN equals itself; 0 differs from -0
  2. NaN differs from itself; 0 equals -0Ճիշտ պատասխան
  3. NaN equals itself; 0 equals -0
  4. NaN differs from itself; 0 differs from -0

Բացատրություն

Under strict equality, NaN differs from every value including itself, while positive and negative zero compare equal. Object.is would produce the opposite outcomes for these special cases, but this prompt uses strict equality.

Շարունակեք այս թեստով

Սկսել վարժանքը
Հարց 14: Which strict-equality results are correct for NaN and the… · JavaScript Fundamentals · Questena