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

Spot the false statement about an arrow function whose body is a block.

  1. It may execute several statements before returning
  2. It can return a value through an explicit return statement
  3. Its final expression is always returned without a return statementՃիշտ պատասխան
  4. It produces undefined if execution finishes without returning a value

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

A block-bodied arrow supplies a value only when execution reaches a return statement carrying that value. Merely evaluating an expression at the end of the block does not create the implicit-return behavior of an expression-bodied arrow.

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

Սկսել վարժանքը
Հարց 83: Spot the false statement about an arrow function whose body… · JavaScript Fundamentals · Questena