var x = 21;
var test = function () { //here u should put parameter "x"
console.log(x); // The output from calling method
var x = 20; //last "x"
//if u want to get the value of last "x" should call
console.log(x); // the value of of last "x"
};
test(x); //here u should put parameter "x"
dmFyIHggPSAyMTsgCnZhciB0ZXN0ID0gZnVuY3Rpb24gKCkgeyAvL2hlcmUgdSBzaG91bGQgcHV0IHBhcmFtZXRlciAieCIKICAgIGNvbnNvbGUubG9nKHgpOyAvLyBUaGUgb3V0cHV0IGZyb20gY2FsbGluZyBtZXRob2QKICAgIHZhciB4ID0gMjA7IC8vbGFzdCAieCIKICAgIC8vaWYgdSB3YW50IHRvIGdldCB0aGUgdmFsdWUgb2YgbGFzdCAieCIgc2hvdWxkIGNhbGwgCiAgICBjb25zb2xlLmxvZyh4KTsgLy8gdGhlIHZhbHVlIG9mIG9mIGxhc3QgIngiCn07IAp0ZXN0KHgpOyAvL2hlcmUgdSBzaG91bGQgcHV0IHBhcmFtZXRlciAieCI=