Skip to content

Instantly share code, notes, and snippets.

@chakrit
Created March 26, 2012 13:27
Show Gist options
  • Select an option

  • Save chakrit/2205039 to your computer and use it in GitHub Desktop.

Select an option

Save chakrit/2205039 to your computer and use it in GitHub Desktop.
var unscoped = function(objName) {
return eval(objName);
};
var x = 111;
function newScope() {
var x = 222;
return unscoped('x');
};
console.log(newScope());
@chakrit
Copy link
Author

chakrit commented Mar 27, 2012 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment