Skip to content

Instantly share code, notes, and snippets.

@simpluslabs
Created November 28, 2018 04:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simpluslabs/64163ffdfbfaeb89c6633143790c64fd to your computer and use it in GitHub Desktop.
Save simpluslabs/64163ffdfbfaeb89c6633143790c64fd to your computer and use it in GitHub Desktop.
({
testEvalLocal : function(component, event, helper)
{
console.log('inside testEvalLocal');
window.foo = 1;
function bar() {
var foo = 2;
return eval("foo");
}
var val = bar();
console.log('value-local-'+val);
console.log('value-global-'+foo);
return val;
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment