This content originally appeared on DEV Community and was authored by Siddharth
By a true quine I mean a real true quine. Maybe the wikipedia article of quine will help:
A quine is a computer program which takes no input and produces a copy of its own source code as its only output. The standard terms for these programs in the computability theory and computer science literature are "self-replicating programs", "self-reproducing programs", and "self-copying programs".
So no evals or reading the source like this:
function quine() { console.log(quine.toString()+" quine();") } quine();
Can you do it?
If you need a hint
The wikipedia article contains a Java Quine
This content originally appeared on DEV Community and was authored by Siddharth
Siddharth | Sciencx (2021-05-08T10:16:12+00:00) Challenge: Write a true quine. Retrieved from https://www.scien.cx/2021/05/08/challenge-write-a-true-quine/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.