3 JavaScript questions to watch out for during coding interviews
Daniel Borowski
1.4K29

Worth mentioning that, while I debounce using the same type of simple function most of the time, this is not a perfectly valid solution, since at first use it will still wait for two seconds before doing something; assuming the event fires regularly at an interval less than two seconds, your function will never be called. Here is a good example of a complete function: https://davidwalsh.name/javascript-debounce-function , allowing for calling the initial function at the leading edge.

Show your support

Clapping shows how much you appreciated Costin Manda’s story.