A debounce variant that fires the callback on the leading edge (immediately on first call) rather than waiting for the delay to pass.
Asked in frontend interviews at Microsoft, Amazon, Google and 1 more