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

Which statement about the Number value NaN is true?

  1. NaN == NaN is true but NaN === NaN is false
  2. NaN === NaN is true and ordered comparisons are false
  3. NaN is equal to itself but unequal to every other number
  4. NaN is unequal to itself and ordered comparisons with it are falseՃիշտ պատասխան

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

NaN compares unequal to itself with both loose and strict equality, and ordered comparisons involving it are false. Therefore equality against NaN is not a reliable test; Number.isNaN or Object.is can identify the value directly.

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

Սկսել վարժանքը
Հարց 120: Which statement about the Number value NaN is true? · JavaScript Fundamentals · Questena