Skip to content

ga-wdi-lessons/js-scope

Repository files navigation

Scope and Context

This lesson will cover two concepts that are crucial to writing strong, robust code and understanding Javascript: Scope and Context. These concepts are also commonly covered in interview questions, since they factor into how we write and organize our code or simply put, how we decide where to put things.

To explore these concepts we will be looking at a series of examples that unveil the mechanics of scope and context. Through comparing and contrasting code examples look that seem similar yet contain important differences, we'll highlight how scope and context operate in Javascript. The examples ultimately aim to illustrate that the way that code is written and structured affects how and where its program data (its variables or references) can be accessed.

Part I: Scope

Part II: Context

Additional Course Reading

  • Closely related to the concept of scope is the concept of closures.

Examples

External Resources

About

[js,scope,closure]

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors