JavaScript Developer — Hard
Key points
- The inner function accesses the x variable declared within its scope.
- JavaScript functions create closures that allow inner functions to access variables from outer functions.
- The outer x variable with a value of 10 is not accessible inside the inner function.
Ready to go further?
Related questions
