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

A function has a parameter named input and a local binding named result. No closure is returned. What can code outside that function access directly?

  1. Both bindings, because every function local is global after a call
  2. Only the parameter, because arguments always remain public
  3. Neither input nor result can be accessed there as a directly resolved bindingՃիշտ պատասխան
  4. Only the local result, because local names escape on completion

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

Parameters and local bindings belong to the function's own scope, so outside code cannot directly resolve input or result from that call. Returning a value is not the same as exposing those bindings, and only a returned closure could retain private internal access.

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

Սկսել վարժանքը
Հարց 95: A function has a parameter named input and a local binding… · JavaScript Fundamentals · Questena