Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var recursive = "var iterationNum=ITERATION_NUM; console.log('iteration number %s', iterationNum); var recursive = \"REPLACE\"; eval(recursive.replace('REPLACE', recursive.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"').replace(/'/g, '\\\\\\'')).replace('ITERATION_NUM', iterationNum + 1))";
eval(recursive.replace('REPLACE', recursive.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/'/g, '\\\'')).replace('ITERATION_NUM', 0));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment