made with esnextbin
Last active
September 20, 2016 20:11
-
-
Save DamianMullins/77bf8d69216ee2913ecd9fbf8be15f91 to your computer and use it in GitHub Desktop.
esnextbin sketch
This file contains hidden or 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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Cheating Lexical - Eval</title> | |
</head> | |
<body> | |
<p class="a">a: <span></span></p> | |
<p class="b">b: <span></span></p> | |
</body> | |
</html> |
This file contains hidden or 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); | |
document.querySelector('.a span').innerHTML = a; | |
document.querySelector('.b span').innerHTML = b; | |
} | |
var b = 2; | |
foo('var b = 3;', 1); |
This file contains hidden or 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
{ | |
"name": "esnextbin-sketch", | |
"version": "0.0.0" | |
} |
This file contains hidden or 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
'use strict'; | |
function foo(str, a) { | |
eval(str); | |
document.querySelector('.a span').innerHTML = a; | |
document.querySelector('.b span').innerHTML = b; | |
} | |
var b = 2; | |
foo('var b = 3;', 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment