# Version

*Version: 3.0.0* ( 6fe763f )

# Test case

```javascript
var foo = function() {
    var y = 200;
    try {
        throw {}
    } catch ({
        x = function(){print(y);}
    }) {
        let y = 300;
        x();
    }
};
foo();
```

# Execution steps

`/root/.jsvu/jerry Testcase.js`

# Output

`300`

# Expected behavior

`200`

# Description

The correct output of the Testcase should be `200` while jerryscript yields `300`. The reason I think is that jerryscript fails to deal with the scope of the global and local variables `y`, where jerryscript may treat the local variable `y` at line 8 as the global variable, leading to output `300` at line 6. 

Looking forward to your reply :)
Variable Scope Problem
This is a GitHub Issue
repo:jerryscript
owner:jerryscript-project
Title : Variable Scope Problem
Issue date:

--- start body ---
# Version

*Version: 3.0.0* ( 6fe763f )

# Test case

```javascript
var foo = function() {
    var y = 200;
    try {
        throw {}
    } catch ({
        x = function(){print(y);}
    }) {
        let y = 300;
        x();
    }
};
foo();
```

# Execution steps

`/root/.jsvu/jerry Testcase.js`

# Output

`300`

# Expected behavior

`200`

# Description

The correct output of the Testcase should be `200` while jerryscript yields `300`. The reason I think is that jerryscript fails to deal with the scope of the global and local variables `y`, where jerryscript may treat the local variable `y` at line 8 as the global variable, leading to output `300` at line 6. 

Looking forward to your reply :)
--- end body ---

None