JavaScript
Python
Java
React
Sorting Visualizer
Complexity Analyzer
Coding Patterns
1. Fundamentals
1.1. Variables (var, let, const)
1.2. Data Types
1.3. Type Coercion
1.4. Strict Equality (===)
1.5. Operators
1.6. Template Literals
1.7. Truthy and Falsy Values
1.8. Control Flow (if/else)
1.9. Loops (for, while)
1.10. The `switch` Statement
2. Functions
2.1. Declaration vs. Expression
2.2. Arrow Functions
2.3. Parameters and Default Values
2.4. Scope (Global, Function, Block)
2.5. Closures
2.6. The `this` Keyword
2.7. `call()`, `apply()`, `bind()`
2.8. Higher-Order Functions
2.9. Recursion
2.10. IIFE (Immediately Invoked Function Expression)
3. Arrays
3.1. Array Creation
3.2. Methods: `push`, `pop`, `shift`, `unshift`
3.3. Iteration: `forEach`
3.4. Transformation: `map`
3.5. Filtering: `filter`
3.6. Aggregation: `reduce`
3.7. Searching: `find` and `findIndex`
3.8. Conditionals: `some` and `every`
3.9. `slice()` vs. `splice()`
3.10. `Array.from()` and `Array.of()`
4. Objects
4.1. Object Literals
4.2. Accessing Properties
4.3. Property and Method Shorthand
4.4. Object Destructuring
4.5. `Object.keys`, `values`, `entries`
4.6. `Object.assign()`
4.7. `Object.freeze()`
4.8. The `for...in` Loop
4.9. Optional Chaining (`?.`)
4.10. `Object.hasOwn()`
5. Asynchronous JavaScript
5.1. The Event Loop
5.2. Callbacks
5.3. Promises
5.4. Promise Chaining (`.then`)
5.5. Error Handling (`.catch`)
5.6. `async` / `await`
5.7. Error Handling with `try...catch`
5.8. `Promise.all`
5.9. `Promise.race`
5.10. `Promise.allSettled`
6. OOP & Prototypes
6.1. Prototypal Inheritance
6.2. Constructor Functions
6.3. The `prototype` Property
6.4. `Object.create()`
6.5. ES6 Classes
6.6. Inheritance with `extends`
6.7. The `super` Keyword
6.8. Getters and Setters
6.9. Static Methods and Properties
6.10. Private Class Fields (`#`)
7. DOM & Web APIs
7.1. Selecting DOM Elements
7.2. Manipulating DOM Elements
7.3. Events and Event Listeners
7.4. Event Propagation (Bubbling)
7.5. Event Delegation
7.6. The Fetch API
7.7. `localStorage` and `sessionStorage`
7.8. JSON `parse` & `stringify`
7.9. Web Workers
7.10. Intersection Observer API
8. ES Modules & Tooling
8.1. ES6 Modules: `import` and `export`
8.2. Named vs. Default Exports
8.3. Dynamic `import()`
8.4. `npm` and `package.json`
8.5. Transpilation (Babel)
8.6. Bundling (webpack, Vite)
8.7. Linting (ESLint)
8.8. Code Formatting (Prettier)
8.9. Task Runners (npm scripts)
8.10. Source Maps
9. Modern ES Features
9.1. Spread & Rest in Arrays
9.2. Spread & Rest in Objects
9.3. `Set` Object
9.4. `Map` Object
9.5. `Symbol` Primitive Type
9.6. `flat()` and `flatMap()`
9.7. Nullish Coalescing Operator (`??`)
9.8. `BigInt`
9.9. `structuredClone()`
9.10. The `.at()` method
10. Advanced Patterns & Concepts
10.1. Generators (`function*`)
10.2. `Proxy` API
10.3. `Reflect` API
10.4. Strict Mode
10.5. Immutability
10.6. Currying
10.7. Memoization
10.8. Debouncing
10.9. Throttling
10.10. Garbage Collection
Interview Questions
1. What is a closure?
2. Explain the Event Loop.
3. What is prototypal inheritance?
4. Explain `this` keyword.
5. What is the difference between `==` and `===`?
6. What are the differences between `var`, `let`, and `const`?
7. What is hoisting?
8. What is an IIFE and why might you use one?
9. Explain `call`, `apply`, and `bind`.
10. What are truthy and falsy values?
11. What are the primitive data types in JavaScript?
12. Does JavaScript pass by value or pass by reference?
13. What is the output of `typeof null` and why?
14. What are the main features of arrow functions?
15. What is a Promise?
16. What is promise chaining?
17. What are `Promise.all`, `Promise.race`, and `Promise.allSettled`?
18. How does `async/await` work?
19. What is destructuring?
20. What is the difference between Rest Parameters and Spread Syntax?
21. Are ES6 classes just syntactic sugar?
22. Explain event delegation.
23. `map()` vs. `forEach()`
24. What is `NaN`? What is its type?
25. What is currying?
26. What does `"use strict";` do?
27. What is event bubbling vs. capturing?
28. How is `Object.create()` different from a constructor?
29. Compare `Set`, `Map`, `WeakSet`, and `WeakMap`.
30. What is CORS?
31. What is a higher-order function?
32. What is an "array-like" object? How do you convert it to an array?
33. What is memoization and why would you use it?
34. What is the output of this code?
35. How would you fix the code from the previous question?
36. What is a generator function?
37. Why does this code not work as expected?
38. How do you fix the previous loop problem?
39. Name five ES6 features.
40. What is the difference between `localStorage` and `sessionStorage`?
41. What is the difference between a microtask and a macrotask?
42. What is the difference between composition and inheritance?
43. Explain debouncing and throttling.
44. How do ES6 modules work?
45. What is the Shadow DOM?
46. Name some array methods that mutate the original array and some that do not.
47. What is a pure function?
48. What is optional chaining `?.`?
49. What is the nullish coalescing operator `??`?
50. What does the `new` keyword do?
51. Why use Web Workers?
52. What are static methods and properties in a class?
53. How do you assign an alias during object destructuring?
54. What is the difference between a function declaration and a function expression?
55. What will this code log to the console?
56. What is the `arguments` object?
57. What are Web Components?
58. How do you reliably check if a variable is an array?
59. What is recursion?
60. What is the Same-Origin Policy?
61. What is JSONP and how does it work?
62. What is the output of this code?
63. How do you create private members in a JavaScript class?
64. What does it mean for something to be immutable?
65. Differentiate between the DOM and the BOM.
66. What is the difference between HTTP and HTTPS?
67. What will be logged to the console?
68. Name some common HTTP methods (verbs) and their uses.
69. What is a RESTful API?
70. What is the output?
71. Compare Cookies, `localStorage`, and `sessionStorage`.
72. When would you use a `Map` over an `Object`?
73. What is a `Symbol` used for?
74. What is the order of execution here?
75. Why does this arrow function not work as a method?
76. What is `Object.is()`?
77. What is the issue with this copy method?
78. How can you perform a deep copy?
79. What is `Promise.prototype.finally()` used for?
80. What is logged?
81. What is `Array.from()`?
82. Briefly explain garbage collection in JavaScript.
83. What is a memory leak? Give an example.
84. What is a tagged template literal?
85. What does this code print?
86. What can you do with the `Proxy` API?
87. What does this IIFE do?
88. What are WebSockets?
89. What is a Service Worker?
90. When would you use `BigInt`?
91. Differentiate `slice` and `splice`.
92. What is the value of `foo`?
93. What is the Web Crypto API?
94. What will be logged?
95. What is the output?
96. What is `structuredClone` and how is it useful?
97. What is the difference between `Object.seal()` and `Object.freeze()`?
98. What is the value of `x`?
99. Explain method chaining in the context of array methods.
100. What is the difference between a polyfill and a transpiler?
Toggle Sidebar
Code Playground
Loading Terminal...