Cracking the Javascript Interview11
Cracking the Javascript Interview11
JAVASCRIPT
INTERVIEW
Must-Know Questions & Answers!
@ sanuj bansal
React Fundamentals
@ sanuj bansal
React Fundamentals
@ sanuj bansal
React Fundamentals
15. What is a callback function? What are callback hell and how can you
avoid it?
A callback is a function passed as an argument to another function. Callback
hell occurs when callbacks are nested deeply. It can be avoided using
Promises or async/await.
@ sanuj bansal
React Fundamentals
16. What is event delegation in JavaScript?
Event delegation is a technique where a parent element handles events for
its child elements using event bubbling.
17. What are the different ways to deep clone an object in JavaScript?
Deep cloning means creating a full copy of an object including nested
structures. This can be done using structured cloning or libraries.
18. Explain debounce and throttle functions. Where are they used?
Debounce limits how often a function is called after a delay, useful in search
input. Throttle limits function calls at regular intervals, useful in scroll or
resize events.
19. What are modules in JavaScript and how do you export/import them?
Modules are files that encapsulate code. They can export functions,
variables, or objects and import them in other files for reuse and separation
of concerns.
@ sanuj bansal
Follow For More
Such Content !
Sanuj Bansal
Senior Developer