var x=21; var myFunction = function(){ console.log(x); var x= 20; }; myFunction();

JavaScript
var x=21;
var myFunction = function(){
console.log(x);
var x= 20;
};
myFuntion();
Source

Also in JavaScript: