Вызов функции один раз
const once = fn => { let called = false; return function(…args) { if (called) return; called = true; return fn.apply(this, args); }; };
const startApp = function(event) { console.log(this, event); // document.body, MouseEvent }; document.body.addEventListener('click', once(startApp)); // only runs `startApp` once upon click