Question library
Questions from real interviews. Drill any of them by voice in a couple of minutes, with an interviewer, a score and feedback.
What is a closure in JavaScript? Give an example of where it's used in practice.JuniorWhat is a decorator in Python? How would you write your own decorator, for example one that measures how long a function takes to run?JuniorWrite a debounce function. It takes another function and a delay in milliseconds and returns a new function that calls the original only once that delay has passed since the last call.JuniorHow can closures lead to memory leaks in a frontend application, and how would you go about finding such a leak?Mid-levelHow are closures related to memory leaks in a long-lived SPA? Tell me how you found and fixed leaks like that.Senior