Top "Scope" questions

Scope is an enclosing context where values and expressions are associated.

Using global variables in a function

How can I create or use a global variable in a function? If I create a global variable in one …

python global-variables scope
How do JavaScript closures work?

How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, …

javascript function variables scope closures
What's the difference between using "let" and "var"?

ECMAScript 6 introduced the let statement. I've heard it that it's described as a local variable, but I'm still not quite …

javascript scope ecmascript-6 var let
Define global variable in a JavaScript function

Is it possible to define a global variable in a JavaScript function? I want use the trailimage variable (declared in …

javascript function variables scope declaration
How do I declare a global variable in VBA?

I wrote the following code: Function find_results_idle() Public iRaw As Integer Public iColumn As Integer iRaw = 1 iColumn = 1 And …

excel vba scope global-variables
When to use self over $this?

In PHP 5, what is the difference between using self and $this? When is each appropriate?

php class oop scope
What is the scope of variables in JavaScript?

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a …

javascript function variables scope var
How to use Global Variables in C#?

How do I declare a variable so that every class (*.cs) can access its content, without an instance reference?

c# variables scope
Can I access variables from another file?

Is it possible to use a variable in a file called first.js inside another file called second.js? first.…

javascript scope
How to remove elements/nodes from angular.js array

I am trying to remove elements from the array $scope.items so that items are removed in the view ng-repeat="…

angularjs scope angularjs-ng-repeat