Interview Q&A

Master technical and career interviews with structured answers—short definition, real examples, pitfalls, and how to answer in 60–90 seconds.

4608 total questions 4508 technical 100 career & HR 4272 from PDF library

Showing 576–600 of 963

Career & HR topics

By tech stack

Popular tracks

Junior PDF
What is a favicon and how is it added?

Short answer: A favicon is the small icon shown in the browser tab. Example code <link rel="icon" type="image/png" href="favicon.png"> Key Takeaway: Favicons help brand your site in th…

JavaScript Read answer
Junior PDF
What is recursion?

Short answer: A function that calls itself until a base condition is met. Example: function factorial(n) { if (n === 0) return 1; return n * factorial(n - 1); } console.log(factorial(5)); // 120 Example code A function t…

JavaScript Read answer
Junior PDF
What is the difference between microtask and macrotask queue?

Short answer: Type Example Priority Microtask Promise.then, MutationObserver Higher Macrotask setTimeout, setInterval Lower Example: setTimeout(() => console.log("Macro"), 0); Example code Promise.resolve().…

JavaScript Read answer
Junior PDF
What is the difference between mutable and immutable objects?

Short answer: Mutable: Can be changed after creation (e.g., arrays, objects). Immutable: Cannot be changed once created (e.g., strings, numbers). Say this in the interview Define — one clear sentence (the short answer ab…

JavaScript Read answer
Junior PDF
What is destructuring in JavaScript?

Short answer: It allows unpacking values from arrays or objects. Example: const [a, b] = [1, 2]; const { name, age } = { name: "John", age: 30 }; Example code It allows unpacking values from arrays or objects.…

JavaScript Read answer
Junior PDF
What is the purpose of the <title> tag?

Short answer: It defines the page title shown in the browser tab and search results. Example: &lt;title&gt;My Portfolio | &lt;/title&gt; Key Takeaway: Make your titles descriptive for better SEO and UX. Intermediate Real…

JavaScript Read answer
Junior PDF
What is the difference between parameters and arguments?

Short answer: Parameters: variables listed in the function definition Arguments: actual values passed to the function when calling it Example: function greet(name) { // name = parameter console.log(`Hello ${name}`); } Ex…

JavaScript Read answer
Junior PDF
What is tail call optimization?

Short answer: Follow me on LinkedIn: When a function’s final action is calling another function, JS can reuse the stack frame to avoid overflow. Example: function factorial(n, acc = 1) { if (n === 0) return acc; Example…

JavaScript Read answer
Junior PDF
What is memoization?

Short answer: An optimization technique to cache function results for repeated inputs. Example: function memoize(fn) { const cache = {}; return x =&gt; cache[x] || (cache[x] = fn(x)); } Example code An optimization techn…

JavaScript Read answer
Junior PDF
What is the difference between synchronous and asynchronous code?

Short answer: Type Description Example Synchronous Executes line by line for loop Follow me on LinkedIn: Asynchronou Doesn’t block — runs later via callbacks, promises setTimeout, fetch() Real-world example (ShopNest) Th…

JavaScript Read answer
Junior PDF
What is a closure?

Short answer: A closure is a function that retains access to variables from its outer scope even after the outer function has executed. Example: function outer() { let count = 0; Example code return function inner() { co…

JavaScript Read answer
Junior PDF
What is the Temporal Dead Zone (TDZ)?

Short answer: The period between variable declaration and initialization where it cannot be accessed. Example: console.log(x); // ReferenceError let x = 10; Example code The period between variable declaration and initia…

JavaScript Read answer
Junior PDF
What is the difference between Object.seal(), Object.freeze(), and Object.preventExtensions()?

Short answer: Method Add Props Modify Delete preventExtensio ns() ❌ No ✅ Yes ✅ Yes seal() ❌ No ✅ Yes ❌ No freeze() ❌ No ❌ No ❌ No Real-world example (ShopNest) ShopNest’s browser cart uses modern JavaScript: fetch APIs w…

JavaScript Read answer
Junior PDF
What is optional chaining?

Short answer: A safe way to access nested properties without throwing an error if something is undefined or null. Example: console.log(user?.address?.city); Example code A safe way to access nested properties without thr…

JavaScript Read answer
Junior PDF
What is the difference between eval() and Function() constructor?

Short answer: Both execute dynamic code, but: eval() executes in the current scope (less safe). Function() executes in a new scope (safer). Example: eval(&quot;var a = 5&quot;); const b = new Function(&quot;return 5;&quo…

JavaScript Read answer
Junior PDF
What is lexical scoping?

Short answer: Lexical scoping means that the scope of a variable is determined by its position in the source code. Inner functions have access to variables declared in their outer scope. Example code function outer() { l…

JavaScript Read answer
Junior PDF
What is Bootstrap’s Reboot?

Short answer: Reboot is a modernized CSS reset that standardizes browser styles for consistent rendering. Follow me on LinkedIn: Real-world example (ShopNest) ShopNest’s browser cart uses modern JavaScript: fetch APIs wi…

JavaScript Read answer
Junior PDF
What is an object in JavaScript?

Short answer: An object is a collection of key-value pairs used to store related data and functions. Example: let person = { name: &quot;Sandeep&quot;, age: 30 }; Example code An object is a collection of key-value pairs…

JavaScript Read answer
Junior PDF
What is the this keyword?

Short answer: this refers to the context in which a function is called. Real-world example (ShopNest) Prefer arrow functions for React/event callbacks in ShopNest so this is not accidentally rebound. Say this in the inte…

JavaScript Read answer
Junior PDF
What is object destructuring?

Short answer: Extract values from objects into variables. Example: const person = { name: &quot;Sandeep&quot;, age: 30 }; const { name, age } = person; console.log(name, age); // Sandeep 30 Example code Extract values fr…

JavaScript Read answer
Junior PDF
What is array destructuring?

Short answer: Extract elements from arrays into variables. Example: let [first, second] = [10, 20]; console.log(first, second); // 10 20 Example code Extract elements from arrays into variables. Example: let [first, seco…

JavaScript Read answer
Junior PDF
What is the spread operator?

Short answer: Allows expanding arrays or objects. Example: let arr1 = [1, 2]; let arr2 = [...arr1, 3, 4]; // [1,2,3,4] let obj1 = { a: 1 }; let obj2 = { ...obj1, b: 2 }; // { a:1, b:2 } Example code Allows expanding arra…

JavaScript Read answer
Junior PDF
What is prototypal inheritance?

Short answer: JavaScript objects inherit properties and methods from other objects through prototypes. This allows reuse of methods and shared behavior. Example: const parent = { greet() { console.log(&quot;Hello&quot;);…

JavaScript Read answer
Junior PDF
What is the prototype chain?

Short answer: The prototype chain is the chain of objects that JavaScript follows to look up properties or methods. If a property isn’t found on the object itself, JS checks the object's prototype, and continues up the c…

JavaScript Read answer
Junior PDF
What is Object.create()?

Short answer: Creates a new object with the specified prototype object. Example: const parent = { greet() { console.log(&quot;Hello&quot;); } }; const child = Object.create(parent); child.greet(); // Hello Example code C…

JavaScript Read answer

JavaScript JavaScript Tutorial · JavaScript

Short answer: A favicon is the small icon shown in the browser tab.

Example code

<link rel="icon" type="image/png" href="favicon.png"> Key Takeaway: Favicons help brand your site in the browser.

Real-world example (ShopNest)

ShopNest’s browser cart uses modern JavaScript: fetch APIs with async/await, modules, and clear error handling.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Short answer: A function that calls itself until a base condition is met. Example: function factorial(n) { if (n === 0) return 1; return n * factorial(n - 1); } console.log(factorial(5)); // 120

Example code

A function that calls itself until a base condition is met. Example: function factorial(n) { if (n === 0) return 1;
return n * factorial(n - 1);
} console.log(factorial(5)); // 120

Real-world example (ShopNest)

ShopNest’s browser cart uses modern JavaScript: fetch APIs with async/await, modules, and clear error handling.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Short answer: Type Example Priority Microtask Promise.then, MutationObserver Higher Macrotask setTimeout, setInterval Lower Example: setTimeout(() => console.log("Macro"), 0);

Example code

Promise.resolve().then(() => console.log("Micro")); // Output: Micro → Macro

Real-world example (ShopNest)

ShopNest’s browser cart uses modern JavaScript: fetch APIs with async/await, modules, and clear error handling.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Short answer: Mutable: Can be changed after creation (e.g., arrays, objects). Immutable: Cannot be changed once created (e.g., strings, numbers).

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Short answer: It allows unpacking values from arrays or objects. Example: const [a, b] = [1, 2]; const { name, age } = { name: "John", age: 30 };

Example code

It allows unpacking values from arrays or objects. Example: const [a, b] = [1, 2];
const { name, age } = { name: "John", age: 30 };

Real-world example (ShopNest)

ShopNest’s browser cart uses modern JavaScript: fetch APIs with async/await, modules, and clear error handling.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Short answer: It defines the page title shown in the browser tab and search results. Example: <title>My Portfolio | </title> Key Takeaway: Make your titles descriptive for better SEO and UX. Intermediate

Real-world example (ShopNest)

ShopNest’s browser cart uses modern JavaScript: fetch APIs with async/await, modules, and clear error handling.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Short answer: Parameters: variables listed in the function definition Arguments: actual values passed to the function when calling it Example: function greet(name) { // name = parameter console.log(`Hello ${name}`); }

Example code

greet("Sandeep"); // "Sandeep" = argument

Real-world example (ShopNest)

ShopNest’s browser cart uses modern JavaScript: fetch APIs with async/await, modules, and clear error handling.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Short answer: Follow me on LinkedIn: When a function’s final action is calling another function, JS can reuse the stack frame to avoid overflow. Example: function factorial(n, acc = 1) { if (n === 0) return acc;

Example code

return factorial(n - 1, n * acc); // Tail call
}

Real-world example (ShopNest)

ShopNest’s browser cart uses modern JavaScript: fetch APIs with async/await, modules, and clear error handling.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Short answer: An optimization technique to cache function results for repeated inputs. Example: function memoize(fn) { const cache = {}; return x => cache[x] || (cache[x] = fn(x)); }

Example code

An optimization technique to cache function results for repeated inputs. Example: function memoize(fn) { const cache = {};
return x => cache[x] || (cache[x] = fn(x));
}

Real-world example (ShopNest)

ShopNest’s browser cart uses modern JavaScript: fetch APIs with async/await, modules, and clear error handling.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Short answer: Type Description Example Synchronous Executes line by line for loop Follow me on LinkedIn: Asynchronou Doesn’t block — runs later via callbacks, promises setTimeout, fetch()

Real-world example (ShopNest)

The checkout button uses async/await to call /api/orders, shows a spinner, and catches network errors with a toast.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Short answer: A closure is a function that retains access to variables from its outer scope even after the outer function has executed. Example: function outer() { let count = 0;

Example code

return function inner() { count++; return count; }; }
const counter = outer(); console.log(counter()); // 1 console.log(counter()); // 2

Real-world example (ShopNest)

In ShopNest’s cart UI, a click handler closes over productId. Use let in loops so each button keeps the correct id.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Short answer: The period between variable declaration and initialization where it cannot be accessed. Example: console.log(x); // ReferenceError let x = 10;

Example code

The period between variable declaration and initialization where it cannot be accessed. Example: console.log(x); // ReferenceError let x = 10;

Real-world example (ShopNest)

ShopNest’s browser cart uses modern JavaScript: fetch APIs with async/await, modules, and clear error handling.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Short answer: Method Add Props Modify Delete preventExtensio ns() ❌ No ✅ Yes ✅ Yes seal() ❌ No ✅ Yes ❌ No freeze() ❌ No ❌ No ❌ No

Real-world example (ShopNest)

ShopNest’s browser cart uses modern JavaScript: fetch APIs with async/await, modules, and clear error handling.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Short answer: A safe way to access nested properties without throwing an error if something is undefined or null. Example: console.log(user?.address?.city);

Example code

A safe way to access nested properties without throwing an error if something is undefined or null. Example: console.log(user?.address?.city);

Real-world example (ShopNest)

ShopNest’s browser cart uses modern JavaScript: fetch APIs with async/await, modules, and clear error handling.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Short answer: Both execute dynamic code, but: eval() executes in the current scope (less safe). Function() executes in a new scope (safer). Example: eval("var a = 5"); const b = new Function("return 5;"); ⚠ Both are discouraged due to security and performance issues. Bootstrap Interview Questions

Example code

Both execute dynamic code, but: eval() executes in the current scope (less safe). Function() executes in a new scope (safer). Example: eval("var a = 5");
const b = new Function("return 5;"); ⚠ Both are discouraged due to security and performance issues. Bootstrap Interview Questions

Real-world example (ShopNest)

In ShopNest’s cart UI, a click handler closes over productId. Use let in loops so each button keeps the correct id.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Short answer: Lexical scoping means that the scope of a variable is determined by its position in the source code. Inner functions have access to variables declared in their outer scope.

Example code

function outer() { let name = "Sandeep"; function inner() { console.log(name); // accesses outer variable } inner(); } outer(); // Sandeep

Real-world example (ShopNest)

ShopNest’s browser cart uses modern JavaScript: fetch APIs with async/await, modules, and clear error handling.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Short answer: Reboot is a modernized CSS reset that standardizes browser styles for consistent rendering. Follow me on LinkedIn:

Real-world example (ShopNest)

ShopNest’s browser cart uses modern JavaScript: fetch APIs with async/await, modules, and clear error handling.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Short answer: An object is a collection of key-value pairs used to store related data and functions. Example: let person = { name: "Sandeep", age: 30 };

Example code

An object is a collection of key-value pairs used to store related data and functions. Example: let person = { name: "Sandeep", age: 30 };

Real-world example (ShopNest)

ShopNest’s browser cart uses modern JavaScript: fetch APIs with async/await, modules, and clear error handling.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Short answer: this refers to the context in which a function is called.

Real-world example (ShopNest)

Prefer arrow functions for React/event callbacks in ShopNest so this is not accidentally rebound.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Short answer: Extract values from objects into variables. Example: const person = { name: "Sandeep", age: 30 }; const { name, age } = person; console.log(name, age); // Sandeep 30

Example code

Extract values from objects into variables. Example: const person = { name: "Sandeep", age: 30 };
const { name, age } = person; console.log(name, age); // Sandeep 30

Real-world example (ShopNest)

ShopNest’s browser cart uses modern JavaScript: fetch APIs with async/await, modules, and clear error handling.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Short answer: Extract elements from arrays into variables. Example: let [first, second] = [10, 20]; console.log(first, second); // 10 20

Example code

Extract elements from arrays into variables. Example: let [first, second] = [10, 20]; console.log(first, second); // 10 20

Real-world example (ShopNest)

ShopNest’s browser cart uses modern JavaScript: fetch APIs with async/await, modules, and clear error handling.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Short answer: Allows expanding arrays or objects. Example: let arr1 = [1, 2]; let arr2 = [...arr1, 3, 4]; // [1,2,3,4] let obj1 = { a: 1 }; let obj2 = { ...obj1, b: 2 }; // { a:1, b:2 }

Example code

Allows expanding arrays or objects. Example: let arr1 = [1, 2];
let arr2 = [...arr1, 3, 4]; // [1,2,3,4]
let obj1 = { a: 1 };
let obj2 = { ...obj1, b: 2 }; // { a:1, b:2 }

Real-world example (ShopNest)

ShopNest’s browser cart uses modern JavaScript: fetch APIs with async/await, modules, and clear error handling.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Short answer: JavaScript objects inherit properties and methods from other objects through prototypes. This allows reuse of methods and shared behavior. Example: const parent = { greet() { console.log("Hello"); } };

Example code

const child = Object.create(parent); child.greet(); // Hello

Real-world example (ShopNest)

ShopNest’s browser cart uses modern JavaScript: fetch APIs with async/await, modules, and clear error handling.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Short answer: The prototype chain is the chain of objects that JavaScript follows to look up properties or methods. If a property isn’t found on the object itself, JS checks the object's prototype, and continues up the chain.

Example code

console.log(child.toString()); // from Object.prototype

Real-world example (ShopNest)

Prefer arrow functions for React/event callbacks in ShopNest so this is not accidentally rebound.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Short answer: Creates a new object with the specified prototype object. Example: const parent = { greet() { console.log("Hello"); } }; const child = Object.create(parent); child.greet(); // Hello

Example code

Creates a new object with the specified prototype object. Example: const parent = { greet() { console.log("Hello"); } };
const child = Object.create(parent); child.greet(); // Hello

Real-world example (ShopNest)

ShopNest’s browser cart uses modern JavaScript: fetch APIs with async/await, modules, and clear error handling.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details