Skip to content

Instantly share code, notes, and snippets.

@mihailik mihailik/index.html
Created Mar 12, 2015

Embed
What would you like to do?
Recursive let
<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>
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
You can’t perform that action at this time.