Snippets tagged “scope”
3 snippets use this tag.
- How JavaScript Closures WorkJavaScript
In the following snippet, we are going to represent how JavaScript closures work. The easiest way of learning how to use them is investigating examples.
- How to Change Variables from Outside of a DirectiveAngularJs
The way of changing variables depends on the type of scope. See how to change for each type of scope: not inherit, inherit and isolated.
- How to Define Global Variable in a JavaScript FunctionJavaScript
Read the tutorial and learn how to define a global variable in a JavaScript function. Also, read about the differences about the global and local variables.