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

Which statements about arrow expression bodies are true? Select all that apply.

  1. An arrow block automatically returns its final expression
  2. The arrow x => x + 1 returns the computed sumՃիշտ պատասխան
  3. An unparenthesized object literal body is always returned implicitly
  4. A parenthesized object literal can be returned implicitlyՃիշտ պատասխան

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

An arrow whose body is a single expression returns that expression's value without a written return statement. A parenthesized object literal can be that expression, while an unparenthesized one is parsed as a block rather than an implicit object return.

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

Սկսել վարժանքը
Հարց 82: Which statements about arrow expression bodies are true?… · JavaScript Fundamentals · Questena