Last active
August 29, 2015 14:16
-
-
Save mihailik/da0b28725f9e8c607f3d to your computer and use it in GitHub Desktop.
Recursive let
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
<html> | |
<pre id=myscriptout> | |
</pre> | |
<div id=myout> | |
</div> | |
<script id=myfunc type=text> | |
function ro() { | |
"use strict"; | |
let x = Date.now() < 0 ? x : 10; | |
return x; | |
} | |
</script> | |
<script id=myscript type="application/javascript;version=1.7"> | |
try { | |
eval(document.getElementById('myfunc').textContent); | |
document.getElementById('myout').textContent = ro(); | |
document.getElementById('myscriptout').textContent = ro; | |
} | |
catch (err) { | |
document.getElementById('myout').textContent = err + ' ' + err.stack; | |
} | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment