Last active
March 25, 2017 21:13
-
-
Save Obayanju/8d9b12441ecba8987b66a9f9ea7ebd63 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function foo (str, a) { | |
eval(str); //cheating | |
console.log(a, b); | |
} | |
var b = 2; | |
foo( "var b = 3;", 1);//1, 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment