Interview kitsBlog

Your dream job? Lets Git IT.
Interactive technical interview preparation platform designed for modern developers.

XGitHub

Platform

  • Categories

Resources

  • Blog
  • About the app
  • FAQ
  • Feedback

Legal

  • Privacy Policy
  • Terms of Service

© 2026 LetsGit.IT. All rights reserved.

JavaScript

Recruitment and knowledge question base. Filter, search and test your knowledge.

Topics

What are the differences between var, let, and const?

easyvariablesscopees6
Open question

Answer

var is function-scoped and can be re-declared; let/const are block-scoped. const prevents reassignment (but objects can still be mutated).

Explain hoisting in JavaScript. What is hoisted and what is not?

mediumhoistingscopetdz
Open question

Answer

Function and var declarations are hoisted, but initializations are not. let/const are hoisted too but live in the temporal dead zone until initialized.

What is the difference between == and === in JavaScript?

easyequalitycoercion
Open question

Answer

== does type coercion before comparison, while === compares both value and type without coercion.

What is a closure and a typical use case?

mediumclosuresscope
Open question

Answer

A closure is when an inner function retains access to variables from an outer scope. It is commonly used for data privacy or function factories.

How does this binding work, and how do call/apply/bind change it?

mediumthiscall-apply-bind
Open question

Answer

this is determined by the call site. call/apply invoke the function immediately with an explicit this, while bind returns a new function with this permanently set.

Explain prototypal inheritance in JavaScript.

mediumprototypesinheritance
Open question

Answer

Objects inherit from other objects via the prototype chain. Property lookups walk up the chain until found or null. You can create links with Object.create or class syntax.

What is the event loop and how do microtasks differ from macrotasks?

hardevent-loopasync
Open question

Answer

The event loop processes the call stack and task queues. Microtasks (e.g., Promise callbacks) run before the next macrotask (e.g., setTimeout).

How do Promises work and how do they differ from callbacks?

mediumpromisesasync
Open question

Answer

A Promise represents a future value (pending/fulfilled/rejected) and supports chaining with then/catch. Callbacks are functions passed to be invoked later, often leading to nested code.

What is async/await and how do you handle errors with it?

mediumasync-awaitpromises
Open question

Answer

async/await is syntax over Promises that lets you write async code in a sync style. Use try/catch around await or handle rejections with .catch().

What is the difference between shallow and deep copy? How can you deep clone?

hardobjectscopydeep-clone
Open question

Answer

Shallow copy duplicates only top-level properties and keeps nested references. Deep copy recursively clones nested objects (e.g., structuredClone or a custom deep clone).

What are debounce and throttle and when would you use each?

mediumperformancedebouncethrottle
Open question

Answer

Debounce delays execution until events stop firing; throttle limits execution to at most once per interval. Use debounce for input typing, throttle for scroll/resize.

Explain null vs undefined in JavaScript.

easytypesnullundefined
Open question

Answer

undefined means a variable was declared but not assigned; null is an explicit empty value. typeof null is a historical "object".

What is type coercion? Give a surprising example.

mediumcoerciontypes
Open question

Answer

Type coercion is automatic conversion between types (e.g., 3 + 2 + "7" becomes "57").

Explain map, filter, and reduce on arrays.

easyarraysfunctional
Open question

Answer

map transforms each element, filter keeps elements that match a predicate, and reduce accumulates values into a single result.

What does Promise.all do and when would you use it?

mediumpromisesasync
Open question

Answer

Promise.all waits for all promises to resolve and rejects if any reject. Use it to run independent async tasks in parallel and wait for all results.