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

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

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

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

indexOf cannot match NaN when the search value is NaN, so it returns its no-match sentinel, -1. Treating it like includes ignores that the two methods use different equality behavior for this special numeric value.

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

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