Created
November 9, 2016 15:40
-
-
Save filipesilva/ced82e705adf2795a6ef995489af839f to your computer and use it in GitHub Desktop.
self-rep.js
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
let program = ` | |
let program = \`#ref\`; | |
let delimiter = String.fromCharCode(92) + String.fromCharCode(96); | |
program = program.replace(\`#ref\`, program.replace(/\`/g, delimiter)); | |
console.log(program); | |
`; | |
let delimiter = String.fromCharCode(92) + String.fromCharCode(96); | |
program = program.replace(`#ref`, program.replace(/`/g, delimiter)); | |
console.log(program); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment