Debouncing
Debouncing — Debouncing limits the rate at which a function is called by ensuring it only executes after a specified delay since the last invocation. Debouncing is essential for performance optimization. It ensures that expensive operations (like API calls or heavy DOM updates) are not called too frequently. The classic use case is a search input: instead of querying the API on every keystroke, debounce waits until the user stops typing. The leading-edge variant fires immediately then blocks subsequent calls. This term relates to the Function category of the reference. You will meet debouncing in practice when working with APIs such as Function.prototype.call(), Function.prototype.apply(), Function.prototype.bind(), Function.prototype.toString(). Related terms: Closure, Hoisting, Event Loop, Prototype Chain, Temporal Dead Zone (TDZ), IIFE (Immediately Invoked Function Expression). Understanding debouncing makes the rest of the JavaScript documentation noticeably easier to follow, because the concept recurs across methods, guides, and error messages.