|
|
|
|
|
by lifthrasiir
757 days ago
|
|
Partly because it is not exactly a "proper" quine, which is not allowed to access its own source code in any way. This program uses the fact that JS requires `Function.prototype.toString()` to return something that resembles the original JS source code [1], which can be regarded as reading its own source code (a more precise statement would be that it relies on an implementation-defined behavior though). A proper quine in comparison tends to be longer because it has to repeat itself twice in general. [1] https://tc39.es/ecma262/#sec-function.prototype.tostring |
|