var x = 'outer';
(function() {
var x = 'inner';
eval('x'); // "inner"
})();
var num=9;
var retNum = new Function("$", "$=5+$;return $")(num);
console.log(num);//14
console.log(retNum);//9
var x = 'outer';
(function() {
var x = 'inner';
eval('x'); // "inner"
})();
var num=9;
var retNum = new Function("$", "$=5+$;return $")(num);
console.log(num);//14
console.log(retNum);//9