A Quine is a program that:
1) Takes no input.
2) Outputs a copy of its own source code.
This is an example of a function written in JavaScript that prints its own definition on a canvas.
See the Pen Canvas Quine by vladturda (@vladturda) on CodePen.