// makeProfileTimer { function makeProfileTimer() { let t0 = performance.now(); return function tn() { let t1 = performance.now(); return (t1 - t0) * 1000 + 'microseconds'; }; } let timer = makeProfileTimer(); alert("Замеряем время работы этого alert"); alert(timer()); } // makeSaver { } // Final Countdown { let seconds = 5; function timer() { console.log(seconds); const timeout = setTimeout(() => { timer(); }, 1000); if (seconds > 0) { return (function () { return seconds--; })(); } clearTimeout(timeout); if (seconds === 0) { console.log("поехали!"); } } timer(); } // myBind { }