c† † † † † † † #† † #† †  † (€DebU nce function for scroll and resize events */ function debounce(func, wait) { let timeout; return function executedFunction(...args) { const later = () => { clearTimeout(timeout); func(...args); }; clearTimeout(timeout); timeout = setTimeout(later, wait); } }