Peter Seliger
1 min readMay 4, 2024

--

The author still confuses context and scope. this never ever points to any scope. It refers the object, func is called upon ... which means, func is used as a method of what this does refer to.

In addition, already the two throttle implementations, presented to the author in the mentioned interview, are each not implemented correctly regarding context and/or this. Actually both throttle implementations show the lack of knowledge of whomever designed this special interview question.

Regarding the matter of throttle/debounce, I for a very long time did not had to read so much dangerous nonsense. Dangerous because the author seems very confident with what he is talking about, though he slips at the very important details, a beginner is not aware of.

Making a throttle implementation aware of a specific context is fundamental for methods where the context needs to be passed to such a throttle implementation as one of the very function's arguments.

--

--

Responses (2)