Skip to content

Instantly share code, notes, and snippets.

@qntm
Last active October 16, 2023 12:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qntm/79e46a797323deb628e783fd0cd03cbd to your computer and use it in GitHub Desktop.
Save qntm/79e46a797323deb628e783fd0cd03cbd to your computer and use it in GitHub Desktop.
There are others like it, but this one is quine
(s => console.log(`${s}\n(${JSON.stringify(s)})\n`))
("(s => console.log(`${s}\\n(${JSON.stringify(s)})\\n`))")
@qntm
Copy link
Author

qntm commented Jun 13, 2019

If this were a single line,

(s => console.log(`${s}(${JSON.stringify(s)})\n`))("(s => console.log(`${s}(${JSON.stringify(s)})\\n`))")

it would pass linting without any trouble, a fairly unusual property in a JavaScript quine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment