# Variables

* Every execution context will be created with this, argument object along with variable environment.
* variable is used to store any data that to be used in the program.
* variables are assigned to the memory when the execution context is created.
* when the execution context is destroyed(after function invocation is completed), the variable space will be removed from the memory.

```javascript
function two() {
    var name; // undefined
}

function one() {
    var name = "Vijay"; // "Vijay"
}

var name = "Deepak"; // "Deepak"

```

![Execution CallStack of above Example code](https://2037876129-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdbqCujxzeJqeQqlbM2%2F-LlLCwCudFfwZVboK22x%2F-LlLGwqmUdcHd9ksI26n%2Fimage.png?alt=media\&token=322dc695-11f7-447c-9294-8eff17c9f2c6)

![Execution Context](https://2037876129-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdbqCujxzeJqeQqlbM2%2F-LlLH6DPwNokQ3AkhvYU%2F-LlLILFd4JpPWod59IbL%2Fimage.png?alt=media\&token=8987457f-552c-4e2c-9008-bf49f52b0b76)

Every Variable environment inside the Execution context has its own variables.
