Skip to content

Latest commit

 

History

History
23 lines (12 loc) · 833 Bytes

File metadata and controls

23 lines (12 loc) · 833 Bytes

Access Data from Lexical Scope

In this activity you will work on this user story:

  • As a developer, I want to understand lexical scoping by creating a function that accesses the surrounding state.

Your Task

  • It's done when I have opened index.js and modified the function so that it returns another function.

  • It's done when the nested function logs out the name variable.

  • It's done when I assign the return value of the outer function to another variable called myFunction.

  • It's done when I have invoked myFunction() and ensured that the results appear in the developer console.

Hints

  • How can the definition of lexical scope help guide our understanding oh this activity?

Resources