var timer2 = new Timer(document.getElementById("canvas-2")); timer2.counter = 10; timer2.counterendCallback = () => alert("Время истекло!");