Top 100 JavaScript Interview Questions
1️⃣ Core JavaScript (1–30) 1. What are the main features of JavaScript? 2. Difference between Java and
JavaScript. 3. What are data types in JavaScript? 4. Difference between var, let, and const. 5. What is hoisting?
6. Explain scope in JavaScript. 7. Difference between function scope and block scope. 8. What is the
difference between == and ===? 9. Difference between null and undefined. 10. What is NaN in JavaScript?
11. Explain truthy and falsy values. 12. Difference between primitive and reference data types. 13. Explain
type coercion in JavaScript. 14. What is an object in JavaScript? 15. Difference between object and Map. 16.
What is a closure? Provide an example. 17. Explain the concept of ‘this’ keyword. 18. What is the difference
between call, apply, and bind? 19. What is an IIFE (Immediately Invoked Function Expression)? 20. Explain
function expressions vs function declarations. 21. What are template literals? 22. Explain destructuring in
arrays and objects. 23. What is the spread operator? 24. What is the rest parameter? 25. Difference between
for…in and for…of loops. 26. What are symbols in JavaScript? 27. Difference between shallow copy and deep
copy. 28. Explain object freezing and sealing. 29. What is JSON and how to parse/stringify it? 30. What are
JavaScript events?
2️⃣ ES6 and Modern JavaScript (31–50) 31. What is ES6? 32. Difference between var, let, and const in ES6. 33.
What are arrow functions? 34. Explain default parameters in functions. 35. What are template literals in ES6?
36. What is destructuring assignment? 37. What are classes in JavaScript? 38. Difference between class and
constructor function. 39. What are getters and setters in classes? 40. Explain modules in JavaScript. 41.
Difference between import and require. 42. What is the difference between Map and WeakMap? 43. What is
the difference between Set and WeakSet? 44. What is the difference between forEach, map, filter, and
reduce? 45. What are promises in JavaScript? 46. What is async/await? 47. Difference between synchronous
and asynchronous code. 48. What is the event loop in JavaScript? 49. What is microtask and macrotask? 50.
Explain generator functions.
3️⃣ DOM and Events (51–70) 51. What is the DOM? 52. Difference between DOM, BOM, and JavaScript. 53.
How to select elements in JavaScript? 54. What is event delegation? 55. Difference between bubbling and
capturing. 56. What is preventDefault() method? 57. What is stopPropagation() method? 58. How to add and
remove event listeners? 59. Difference between inline, inline-block, and block events. 60. Explain
document.ready vs window.onload. 61. How to manipulate DOM elements dynamically? 62. How to create
elements in JavaScript? 63. How to delete DOM elements? 64. How to change element attributes and styles?
65. How to traverse the DOM? 66. How to clone a node? 67. What is innerHTML vs innerText? 68. What are
form events in JavaScript? 69. How to validate forms using JavaScript? 70. What are custom events?
4️⃣ Advanced JavaScript (71–100) 71. What is the prototype chain? 72. Difference between prototypal and
classical inheritance. 73. Explain the difference between object.create() and class. 74. What are modules in
JavaScript? 75. Difference between ES6 modules and CommonJS modules. 76. What is strict mode? 77. What
is the difference between var/let/const in hoisting? 78. Explain memory leaks in JavaScript. 79. Difference
between call stack and event loop. 80. What are service workers? 81. What is localStorage and
sessionStorage? 82. Difference between cookies, localStorage, and sessionStorage. 83. How to make AJAX
requests using JavaScript? 84. Difference between XMLHttpRequest and fetch API. 85. What are promises
and their states? 86. Difference between synchronous and asynchronous programming. 87. Explain
debounce and throttle functions. 88. Difference between nullish coalescing (??) and OR (||) operator. 89.
What is optional chaining (?.) in JavaScript? 90. Explain the difference between deep clone and shallow clone.
91. How to handle errors using try/catch/finally? 92. What is the difference between event loop and call
1
stack? 93. What is the difference between mutable and immutable objects? 94. Explain currying in
JavaScript. 95. Explain composition vs inheritance in JavaScript. 96. Difference between synchronous and
asynchronous iterators. 97. What is a WeakRef in JavaScript? 98. What are the new features in ES2020 and
ES2021? 99. How to optimize JavaScript performance? 100. Common interview coding problems (reverse
string, palindrome, factorial, array manipulation, sorting, etc.).