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

What does [NaN].includes(NaN) return?

  1. -1
  2. undefined
  3. false
  4. trueՃիշտ պատասխան

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

Array includes uses SameValueZero comparison, under which NaN matches NaN, so the result is true. Assuming the strict-equality NaN rule here applies the wrong comparison semantics to this method.

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

Սկսել վարժանքը
Հարց 53: What does [NaN].includes(NaN) return? · JavaScript Fundamentals · Questena