/ QUESTION BANK

Real questions. From real interviews.

Filter by track, sub-track, difficulty and company. Click any question to start a mock.

495 questions· FrontendPage 1 of 10
HardJavaScriptfrontend

How would you implement a Promise polyfill?

How would you implement a Promise polyfill?

HardJavaScriptfrontend

How would you implement Promise.all() from scratch?

How would you implement Promise.all() from scratch?

MediumJavaScriptfrontend

Why doesn't async/await automatically run code in parallel?

Why doesn't async/await automatically run code in parallel?

MediumJavaScriptfrontend

What's the difference between Promise.all(), Promise.race(), Promise.any(), and Promise.allSettled()?

What's the difference between Promise.all(), Promise.race(), Promise.any(), and Promise.allSettled()?

MediumJavaScriptfrontend

What does .then() return?

What does .then() return?

MediumJavaScriptfrontend

Why does an async function always return a Promise?

Why does an async function always return a Promise?

MediumJavaScriptfrontend

What's the difference between microtasks and macrotasks?

What's the difference between microtasks and macrotasks?

MediumJavaScriptfrontend

Why does Promise.then() run before setTimeout(..., 0)?

Why does Promise.then() run before setTimeout(..., 0)?

MediumJavaScriptfrontend

Why is class just syntactic sugar over prototypes?

Why is class just syntactic sugar over prototypes?

MediumJavaScriptfrontend

Why can't arrow functions be used as constructors?

Why can't arrow functions be used as constructors?

HardJavaScriptfrontend

How would you implement an LRU Cache?

How would you implement an LRU Cache?

MediumJavaScriptfrontend

What happens during the Creation Phase of the Execution Context?

What happens during the Creation Phase of the Execution Context?

MediumJavaScriptfrontend

How does this work in default, implicit, explicit, and new binding?

How does this work in default, implicit, explicit, and new binding?

HardJavaScriptfrontend

How many closures are created in nested functions?

How many closures are created in nested functions?

HardJavaScriptfrontend

Why does typeof sometimes throw a ReferenceError?

Why does typeof sometimes throw a ReferenceError?

MediumJavaScriptfrontend

How does JavaScript find a variable? (Lexical Scope and the Scope Chain)

How does JavaScript find a variable? (Lexical Scope and the Scope Chain)

HardJavaScriptfrontend

How would you deep clone an object with circular references?

How would you deep clone an object with circular references?

MediumJavaScriptfrontend

What is the difference between const and Object.freeze

What is the difference between const and Object.freeze

HardJavaScriptfrontend

What is structuredClone and how is it used for deep copying objects?

What is structuredClone and how is it used for deep copying objects?

EasyJavaScriptfrontend

Why is it important to remove event listeners after use?

Why is it important to remove event listeners after use?

EasyJavaScriptfrontend

What are shadowing and illegal shadowing?

What are shadowing and illegal shadowing?

EasyJavaScriptfrontend

What is module scope in JavaScript?

What is module scope in JavaScript?

EasyJavaScriptfrontend

What are the array mutation methods?

What are the array mutation methods?

EasyJavaScriptfrontend

What is globalThis, and what is the importance of it?

What is globalThis, and what is the importance of it?

MediumJavaScriptfrontend

How to find the number of parameters expected by a function?

How to find the number of parameters expected by a function?

MediumJavaScriptfrontend

What is the difference between substring and substr methods?

What is the difference between substring and substr methods?

EasyJavaScriptfrontend

What is the purpose of requestAnimationFrame method?

What is the purpose of requestAnimationFrame method?

MediumJavaScriptfrontend

How to detect system dark mode in javascript?

How to detect system dark mode in javascript?

EasyJavaScriptfrontend

What is Lexical Scope?

What is Lexical Scope?

EasyJavaScriptfrontend

What are the different ways to execute external scripts?

What are the different ways to execute external scripts?

HardJavaScriptfrontend

What is inline caching?

What is inline caching?

HardJavaScriptfrontend

What are hidden classes?

What are hidden classes?

HardJavaScriptfrontend

What are the real world use cases of proxy?

What are the real world use cases of proxy?

EasyJavaScriptfrontend

What are the event phases of a browser?

What are the event phases of a browser?

EasyJavaScriptfrontend

Give an example of statements affected by automatic semicolon insertion?

Give an example of statements affected by automatic semicolon insertion?

MediumJavaScriptfrontend

What is the difference between map and forEach functions?

What is the difference between map and forEach functions?

MediumJavaScriptfrontend

How do you create polyfills for map, filter and reduce methods?

How do you create polyfills for map, filter and reduce methods?

EasyJavaScriptfrontend

What are the benefits higher order functions?

What are the benefits higher order functions?

EasyJavaScriptfrontend

What are the examples of built-in higher order functions?

What are the examples of built-in higher order functions?

HardJavaScriptfrontend

What are the optimization techniques of V8 engine?

What are the optimization techniques of V8 engine?

EasyJavaScriptfrontend

What are the possible reasons for memory leaks?

What are the possible reasons for memory leaks?

HardJavaScriptfrontend

What are the phases of execution context?

What are the phases of execution context?

EasyJavaScriptfrontend

What are the uses of closures?

What are the uses of closures?

EasyJavaScriptfrontend

What is the purpose of the this keyword in JavaScript?

What is the purpose of the this keyword in JavaScript?

MediumJavaScriptfrontend

How to use await outside of async function prior to ES2022?

How to use await outside of async function prior to ES2022?

EasyJavaScriptfrontend

What is Function Composition?

What is Function Composition?

EasyJavaScriptfrontend

What is module pattern?

What is module pattern?

EasyJavaScriptfrontend

What are compose and pipe functions?

What are compose and pipe functions?

EasyJavaScriptfrontend

What are the possible side-effects in javascript?

What are the possible side-effects in javascript?

HardJavaScriptfrontend

What is referential transparency?

What is referential transparency?