const user = firstName: 'Happy', lastName: 'Rawat' ; function greet(greeting, punctuation) console.log(`$greeting, $this.firstName $this.lastName$punctuation`); // call greet.call(user, 'Hello', '!'); // "Hello, Happy Rawat!" // apply greet.apply(user, ['Welcome', '.']); // "Welcome, Happy Rawat." // bind const delayedGreet = greet.bind(user, 'Hi'); delayedGreet('?'); // "Hi, Happy Rawat?" Use code with caution.
: Closures, the prototype chain, the event loop, and "this" keyword behavior.
What is a Closure in JavaScript?A closure is a function that remembers its outer variables. It "closes over" the scope where it was created.
Deep clone an object.
| Topic | Must-Have Questions | |-------|----------------------| | | Counter module, event loop + closure pitfalls | | Hoisting | var / let / const + temporal dead zone | | Promises & Async | async/await vs promises, promise polyfill | | Prototypes & Inheritance | __proto__ , Object.create , ES6 classes | | Map / Set / WeakMap | Use cases, memory differences | | Event Loop | Output questions with setTimeout , promises, microtask queue | | ES2020–ES2024 | Optional chaining, nullish coalescing, Array.groupBy , structuredClone, toSorted |
: His primary course, JavaScript Interview Masterclass: Top 300 Questions , includes a downloadable PDF Revision Book and is regularly updated for 2025 and 2026.
[ ]
A for ES6+ features (Arrow functions, Destructuring, etc.) Share public link
The Event Loop continuously monitors the Call Stack and checks if it is empty. If empty, it processes tasks from the queues.