Skip to main content

JavaScript Interview Cheat Sheet

Top 50 interview questions with concise answers. Print this page or save as PDF for offline study.

View All JavaScript Questions

1. What is JavaScript and where is it used?

2. Difference between var, let, and const.

3. What is hoisting in JavaScript?

4. Difference between synchronous and asynchronous execution.

5. What is a closure?

6. What are data types in JavaScript?

7. Difference between == and ===.

8. What is the event loop?

9. Difference between null and undefined.

10. What are first-class functions?

11. Difference between function declaration and function expression.

12. What is the this keyword?

13. Difference between call, apply, and bind.

14. What is prototype in JavaScript?

15. Difference between ES5 and ES6.

16. What are promises?

17. Explain async/await.

18. Difference between shallow copy and deep copy.

19. What is the difference between let inside and outside loops?

20. Explain event delegation.

21. What is the difference between function scope and block scope?

22. Explain closures with real-world usage.

23. What is the DOM and how does JavaScript interact with it?

24. Explain event bubbling and capturing.

25. Difference between innerHTML, innerText, and textContent.

26. Explain template literals.

27. What are arrow functions and how do they differ from regular functions?

28. Explain higher-order functions.

29. What is the difference between map, forEach, and filter?

30. Explain setTimeout vs setInterval.

31. What is the difference between synchronous and asynchronous DOM manipulation?

32. Explain promises and chaining.

33. What are the browser storage options in JavaScript?

34. Difference between synchronous and asynchronous XHR/fetch.

35. How do you handle cross-origin requests?

36. Explain event delegation and its benefits.

37. Difference between call, apply, and bind.

38. Difference between == and ===.

39. Difference between null and undefined.

40. What are IIFEs (Immediately Invoked Function Expressions)?

41. Explain ES6 modules and their benefits.

42. Difference between default export and named export.

43. Explain template literals and tagged templates.

44. What are destructuring assignments?

45. Explain rest and spread operators.

46. What are default parameters in functions?

47. Explain arrow functions and lexical this.

48. Difference between let, const, and var in ES6.

49. Explain promises and chaining in ES6+.

50. Explain async/await syntax.

Ready to level up? Start Practice