Waiting until a certain amount of time has passed before triggering an event
- search box
- auto saving input
clearTimeout()at the beginning so that when we get an event repeatedly, reschedule triggering a callback
This article by Josh Comeau explains the details very well!