JavaScript is a high‑level, interpreted (JIT‑compiled), dynamically & weekly typed, multi‑paradigm, prototype‑based, single‑threaded, event‑driven language for building web, mobile, and server‑side applications.
It supports object‑oriented, functional, and imperative styles, and runs:
- In browsers via engines like V8, SpiderMonkey, JavaScriptCore
- On servers via Node.js (V8)
- 🚀 Ultimate JavaScript Interview Playbook
- Dynamically Typed: Variables are not bound to a specific type.
- Weekly Typed: Type coercion is allowed between incompatible types.
- Prototype-based Inheritance: Objects can inherit directly from other objects.
- Single-threaded with Event Loop: Uses call stack, callback queue/task queue/macrotask queue, and microtask queue to manage concurrency.
- Lexical Scoping & Closures: Functions have access to the scope in which they were defined.
- Garbage Collected: Automatic memory management.
- JIT Compiled: Modern JS engines (V8, SpiderMonkey) optimize execution using Just-in-Time compilation.
- V8 (Chrome, Edge)
- SpiderMonkey (Firefox)
- JavaScriptCore (Safari)
- Node.js (V8)
- APIs: modules, streams, clusters, process, filesystem
- Primitive vs Reference types
- Primitive types: Number, String, Boolean, null, undefined, Symbol, BigInt
- Non-primitive: Object, Array, Function
==vs===, truthy/falsy- Type conversions &
typeof,instanceof,Object.prototype.toString.call()
- Execution context: global, function, eval
- Scope chain and lexical scope
- Function scope vs block scope
- Closures: memory, use cases, leaks
- IIFE (Immediately Invoked Function Expression)
- Variables:
var/let/const - Hoisting & Temporal Dead Zone (TDZ)
- Scopes & Lexical Environment
this,eval(),withstatement- Primitive vs Reference types
- Shallow vs Deep copy
- Strict mode
- The
this,windowkeyword - Closures, IIFE
- call, bind, apply
- Callbacks & Promises
Promise.all,Promise.race,Promise.any- Promises: chaining, error handling
async/await: syntax, error flow, parallel execution- Call Stack & Heap
- Event Loop & Task Queues
- Microtasks vs Macrotasks
- Object creation: literals, constructors,
Object.create - Prototypes vs ES6 Classes
- Prototypes and prototype chaining
__proto__vsprototype- ES6 Classes vs constructor functions
- Inheritance patterns: classical vs prototypal
- DOM traversal & manipulation
- Events: bubbling, capturing,
addEventListenervs inline handlers- LocalStorage, SessionStorage, cookies
- Fetch API, XMLHttpRequest
- Web APIs: Geolocation, Notifications, History API
- Modules: CommonJS vs ES Modules
- Global objects:
process,__dirname,__filename - EventEmitter
EventEmitter, Streams, Buffers- OS, Process, Cluster, File System
- File system, Path module
- Async patterns in Node.js
| Concept | Details |
|---|---|
| Call Stack | Function execution contexts (LIFO) |
| Heap | Dynamic memory allocation |
| Event Loop | Manages callbacks, timers, Promises |
| Micro vs Macro Tasks | Promise callbacks vs setTimeout/I/O |
| Execution Context | Creation (scope, hoisting, this) + execution |
| Hoisting | Declarations moved to top of scope |
| Closures | Inner functions retain access to outer scope |
this |
Determined by call‑site & strict/non‑strict mode |
| Scope Chain | Lexical scope lookup |
| Memory Leaks | Unreleased closures, event listeners, DOM references |
| Shadowing & TDZ | Block scope with let/const before initialization |
- Garbage Collection (Mark‑and‑Sweep)
- Memory leaks: closures, DOM references, timers, Detecting & avoiding memory leaks
- Performance profiling (DevTools)
- Currying, Partial Application
- Debounce & Throttle
- Function Composition
- Memoization
- Module pattern, Revealing Module, Singleton patterns
- Factory vs Constructor pattern
- Pub/Sub and Observer pattern
- Chrome DevTools: breakpoints, performance monitor
debuggerkeyword- Unit testing with Jest, Mocha
- Static analysis: ESLint, Prettier
- Bundlers: Webpack, Vite, Parcel
- Transpilers: Babel
- Block‑scoped
let,const - Arrow functions & lexical
this - Template literals & tagged templates
- Destructuring & spread/rest operators
- Modules (
import/export) - Promises, async/await, top‑level await
- Classes (syntactic over prototypes)
- Optional chaining (
?.), nullish coalescing (??) - BigInt, globalThis, WeakRef, Promise.allSettled, etc.
| Domain | Examples |
|---|---|
| Frontend | React, Vue, Angular |
| Backend | Node.js, Express, Nest.js |
| Mobile | React Native, NativeScript |
| Desktop | Electron, Tauri |
| Automation | Puppeteer, Playwright, Deno |
| AI & ML | TensorFlow.js, ONNX.js |
| Edge Compute | Cloudflare Workers, Vercel Edge Functions |
Practice these key concepts to solidify your understanding:
- Global, Block, Function Scope
- Lexical Scope, Shadowing, TDZ
- Module vs Script scope
- The Modern JavaScript Tutorial - In-depth beginner to advanced guide
- JavaScript Tutorial - Comprehensive beginner guide
- JSkatas - Interactive JavaScript exercises
- TypeOfNaN JavaScript Quiz - Fun quizzes on basics
- JavaScript is Weird - Quirks and edge cases
- Prep - Coding interview prep
- FrontendGeeks - Frontend interview questions
- JavaScript Interview Questions - Curated questions
- JavaScript Questions by Lydia Hallie - In-depth explanations
- CodeChef JavaScript Skill Test - Skill assessment
- Advanced JavaScript Quiz - Advanced concepts quiz
- JavaScript Date Master - Date handling challenges
- Codewars - Kata challenges
- BFE.dev - Big Frontend Dev problems
- Greatfrontend - High-quality frontend questions
- JavaScript Challenge #11 - TestDome challenge
- JavaScript Challenge #13 - TestDome challenge
- JavaScript Challenge #14 - TestDome challenge
- JavaScript Challenge #15 - TestDome challenge
- JavaScript Challenge #17 - TestDome challenge
- JavaScript engines zoo
- risingstars js
- React JS Interview Questions - Top React questions
- Top ReactJS Interview Questions - GitHub repo
- React Interview Questions - Comprehensive list
Have questions, or want to dive deeper? Use the Issues tab to:
📌 Suggest new topics or resources
🐛 Report errors
💡 Propose improvements
We encourage open discussion—everyone’s contribution makes this kit better!
Want to help others ace their JavaScript interviews? Contributions in the form of questions, explanations, or improvements are welcome!
Feel free to contribute questions, answers, explanations or improvements via pull requests.
Licensed under MIT © Atul Kumar Awasthi.
