JavaScript Interview Questions
1. What are the key features of JavaScript?
2. What is the difference between var, let, and const?
3. What is hoisting in JavaScript?
4. What are closures in JavaScript?
5. What is the difference between == and ===?
6. What is the difference between null and undefined?
7. What are arrow functions, and how are they different from regular functions?
8. What is the scope of a variable in JavaScript?
9. What is the event loop in JavaScript? Explain call stack, callback queue, and microtask queue.
10. What are Promises? How are they different from callbacks?
11. What is async/await in JavaScript? How does it improve asynchronous code?
12. What is the difference between synchronous and asynchronous code?
13. What is the DOM? How is it manipulated using JavaScript?
14. What is event delegation in JavaScript?
15. What are higher-order functions? Give examples.
16. What are pure functions and side effects in JavaScript?
17. What is the difference between map(), filter(), and reduce()?
18. What are JavaScript data types? Explain primitive vs reference types.
19. What is the difference between shallow copy and deep copy?
20. What is the difference between call(), apply(), and bind()?
21. What are IIFEs (Immediately Invoked Function Expressions)?
22. What is a prototype? What is prototypal inheritance?
23. What is the difference between class and prototype-based inheritance?
24. What is the use of "this" keyword in JavaScript?
25. How does "this" behave in arrow functions vs regular functions?
Page 1
JavaScript Interview Questions
26. What are modules in JavaScript? Difference between CommonJS and ES6 modules?
27. What is the difference between localStorage, sessionStorage, and cookies?
28. What is a debounce function? What is throttling?
29. What is the difference between setTimeout() and setInterval()?
30. What are memory leaks? How can you prevent them?
31. What are the different ways to handle errors in JavaScript?
32. What is the difference between frontend and backend JavaScript?
33. What is CORS and how does JavaScript handle it?
34. What are web APIs and how are they used in JavaScript?
35. What are the new features introduced in ES6 and beyond (ES7ES13)?
Page 2