DEV Community

Siddharth
Siddharth

Posted on

Challenge: Write a true quine

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();
Enter fullscreen mode Exit fullscreen mode

Can you do it?

If you need a hint

The wikipedia article contains a Java Quine

Latest comments (1)

Collapse
 
siddharthshyniben profile image
Siddharth

If you like challenges, I could start a weekly challenge or something. Comment!