We use cookies to enhance your browsing experience.

Learn More
Back to Library
JSjavascript

Debounce Function

Delay function execution.

function debounce(func, timeout = 300){
  let timer;
  return (...args) => {
    clearTimeout(timer);
    timer = setTimeout(() => { func.apply(this, args); }, timeout);
  };
}
js performance timing
25+Total Tools
Operations
4Languages
100%Privacy

We use cookies to enhance your experience and serve personalized ads.