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

A return statement with an expression executes on the current path through a function. What happens next?

  1. The current call ends and the caller receives the returned valueՃիշտ պատասխան
  2. The function continues and returns only after all later statements
  3. Only the nearest loop ends while the function continues
  4. The expression value is discarded automatically

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

Executing return ends that particular function call and sends the expression's value back to the caller. Statements later on the same path are not reached, so return does not merely record a value while execution continues.

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

Սկսել վարժանքը
Հարց 77: A return statement with an expression executes on the… · JavaScript Fundamentals · Questena