back to the lesson

Rewrite to prototypes

importance: 5

The Clock class is written in functional style. Rewrite it using prototypes.

P.S. The clock ticks in the console, open it to see.

Open a sandbox for the task.

Please note that properties that were internal in functional style (template, timer) and the internal method render are marked private with the underscore _.

Open the solution in a sandbox.