Skip to content

Instantly share code, notes, and snippets.

@Obayanju
Created March 25, 2017 22:09
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 Obayanju/b9302464c6898b04d90480d181b364a5 to your computer and use it in GitHub Desktop.
Save Obayanju/b9302464c6898b04d90480d181b364a5 to your computer and use it in GitHub Desktop.
function foo(str) {
"use strict";
eval( str );
console.log( a ); //ReferenceError: a is not defined
}
foo( "var a = 2;" );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment