What must the return value of myFunction be if the following expression is possible?
myFunction() ();
The value returned by the inner function
or
It needs to return a function. (more correct answer)
What does this code do?
const wrap = value => () => value;It passes a value from the outer function into the inner function; and the result of the code block from the inner function is assigned to the “wrap” variable.
In JavaScript, when is a function’s scope determined; when it is called or when it is defined?
When it is defined
What allows JavaScript functions to “remember” values from their surroundings?
Closure