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

Which call returns true under the non-coercing rules of Number.isNaN?

  1. Number.isNaN("hello")
  2. Number.isNaN(undefined)
  3. Number.isNaN(NaN)Ճիշտ պատասխան
  4. Number.isNaN("NaN")

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

Number.isNaN returns true only when its argument is already the Number value NaN, so Number.isNaN(NaN) succeeds. It does not coerce the string hello or undefined before testing, unlike the coercing behavior associated with the global isNaN function.

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

Սկսել վարժանքը
Հարց 119: Which call returns true under the non-coercing rules of… · JavaScript Fundamentals · Questena