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

Which statements describe Number("hello")? Select all that apply.

  1. The result is undefined
  2. The result is NaNՃիշտ պատասխան
  3. The result is zero
  4. The conversion does not throw an exceptionՃիշտ պատասխան

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

The text hello has no valid numeric interpretation for Number conversion, so the result is the Number value NaN. The conversion itself completes without throwing; returning zero would describe a different input case such as an empty string.

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

Սկսել վարժանքը
Հարց 118: Which statements describe Number("hello")? Select all that… · JavaScript Fundamentals · Questena