Eliminating Event Storms With Debouncing in JavaScript
Too Long; Didn't Read
Debounce is a higher-order function that takes 2 arguments: a main function and a timer. The purpose of the debouncing is to reduce the load on the browser by reducing the number of calls. For instance, if you set a debounce with a time of 100 ms to the `onscroll` event, then the function will be executed 100 ms after the scroll stops.