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 101–125 of 126

Career & HR topics

By tech stack

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: "Sandeep", 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: "Sandeep", 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("Hello");…

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("Hello"); } }; const child = Object.create(parent); child.greet(); // Hello Example code C…

JavaScript Read answer
Junior PDF
What is the difference between __proto__ and prototype?

Short answer: property of functions, used when creating objects with new. Explain a bit more __proto __ property of objects, points to the object’s prototype (used in the prototype chain). property of functions, used whe…

JavaScript Read answer
Junior PDF
What is the difference between __proto__ and prototype?

Short answer: Property Description prototy pe A property of functions, used when creating objects with new. __proto __ A property of objects, points to the object’s prototype (used in the prototype chain). Example code f…

JavaScript Read answer
Junior PDF
What is the constructor method?

Short answer: The constructor is a special method for initializing new objects created from a class. Example: class Car { constructor(brand, model) { this.brand = brand; this.model = model; } } Example code The construct…

JavaScript Read answer
Junior PDF
What is the difference between class and function constructor?

Short answer: Feature Function Constructor Class Syntax function Person(){} class Person{} Hoisting Yes, function declarations are hoisted No, classes are not hoisted new required Recommended Required Real-world example…

JavaScript Read answer
Junior PDF
What is super()?

Short answer: super() calls the parent class constructor. Must be called before using this in subclass. Example: class Animal { Example code constructor(name) { this.name = name; } } class Dog extends Animal { constructo…

JavaScript Read answer
Junior PDF
What is asynchronous programming?

Short answer: Allows non-blocking execution, letting other code run while waiting for tasks (e.g., network requests). Say this in the interview Define — one clear sentence (the short answer above). Example — relate it to…

JavaScript Read answer
Junior PDF
What is callback hell?

Short answer: Nested callbacks causing hard-to-read code. Solution: Use Promises or async/await. Real-world example (ShopNest) ShopNest’s browser cart uses modern JavaScript: fetch APIs with async/await, modules, and cle…

JavaScript Read answer
Junior PDF
What is a Promise?

Short answer: n object representing future completion or failure of an async task. Real-world example (ShopNest) The checkout button uses async/await to call /api/orders , shows a spinner, and catches network errors with…

JavaScript Read answer
Junior PDF
What is async / await?

Short answer: sync function fetchData() { try { const res = await fetch('/api/data'); const data = await res.json(); console.log(data); } catch (err) { console.error(err); } } sync function fetchData() { try { const res…

JavaScript Read answer
Junior PDF
What is async / await?

Short answer: Syntactic sugar over Promises for cleaner asynchronous code. async function fetchData() { try { const res = await fetch('/api/data'); const data = await res.json(); console.log(data); } catch (err) { consol…

JavaScript Read answer
Junior PDF
What is an event loop?

Short answer: Mechanism that manages async callbacks and executes them after the call stack is empty. Real-world example (ShopNest) The checkout button uses async/await to call /api/orders , shows a spinner, and catches…

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

Short answer: n action like click, load, input, keypress. 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 inte…

JavaScript Read answer
Junior PDF
What is event delegation?

Short answer: ttach a listener to a parent to handle events on child elements. Real-world example (ShopNest) ShopNest’s browser cart uses modern JavaScript: fetch APIs with async/await, modules, and clear error handling.…

JavaScript Read answer
Junior PDF
What is error handling?

Short answer: Catching and managing runtime errors to prevent app crashes. Explain a bit more Catching and managing runtime errors to prevent app crashes. Catching and managing runtime errors to prevent app crashes. Catc…

JavaScript Read answer
Junior PDF
What is try…catch?

Short answer: Blocks to handle exceptions. try { JSON.parse("invalid"); } catch(e) { console.error(e); } Example code Blocks to handle exceptions. try { JSON.parse("invalid"); } catch(e) { console.err…

JavaScript Read answer

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

JavaScript JavaScript Tutorial · JavaScript

Short answer: property of functions, used when creating objects with new.

Explain a bit more

__proto __ property of objects, points to the object’s prototype (used in the prototype chain). property of functions, used when creating objects with new. __proto __ property of objects, points to the object’s prototype (used in the prototype chain). property of functions, used when creating objects with new. __proto __ property of objects, points to the object’s prototype (used in the prototype chain). function Person() {} console.log(Person.prototype); // prototype object const p = new Person(); console.log(p.__proto__); // same as Person.prototype property of functions, used when creating objects with new. __proto __ property of objects, points to the object’s prototype (used in the prototype chain).

Example code

function Person() {} console.log(Person.prototype); // prototype object const p = new Person(); console.log(p.__proto__); // same as Person.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: Property Description prototy pe A property of functions, used when creating objects with new. __proto __ A property of objects, points to the object’s prototype (used in the prototype chain).

Example code

function Person() {} console.log(Person.prototype); // prototype object const p = new Person(); console.log(p.__proto__); // same as Person.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: The constructor is a special method for initializing new objects created from a class. Example: class Car { constructor(brand, model) { this.brand = brand; this.model = model; } }

Example code

The constructor is a special method for initializing new objects created from a class. Example: class Car { constructor(brand, model) { this.brand = brand;
this.model = model;
}
}

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: Feature Function Constructor Class Syntax function Person(){} class Person{} Hoisting Yes, function declarations are hoisted No, classes are not hoisted new required Recommended Required

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: super() calls the parent class constructor. Must be called before using this in subclass. Example: class Animal {

Example code

constructor(name) { this.name = name; }
}
class Dog extends Animal { constructor(name, breed) { super(name); this.breed = breed;
}
}

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 non-blocking execution, letting other code run while waiting for tasks (e.g., network requests).

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: Nested callbacks causing hard-to-read code. Solution: Use Promises or async/await.

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: n object representing future completion or failure of an async task.

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: sync function fetchData() { try { const res = await fetch('/api/data'); const data = await res.json(); console.log(data); } catch (err) { console.error(err); } } sync function fetchData() { try { const res = await fetch('/api/data'); const data = await res.json(); console.log(data); } catch (err) { console.error(err); } }… sync function fetchData() { try {… const res = await fetch('/api/data'); const data = await…

Explain a bit more

res.json(); console.log(data); } catch (err) { console.error(err); } } sync function fetchData() { try { const res = await fetch('/api/data'); const data = await res.json(); console.log(data); } catch (err) { console.error(err); } }…

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: Syntactic sugar over Promises for cleaner asynchronous code. async function fetchData() { try { const res = await fetch('/api/data'); const data = await res.json(); console.log(data); } catch (err) { console.error(err); } }

Example code

Syntactic sugar over Promises for cleaner asynchronous code. async function fetchData() { try { const res = await fetch('/api/data');
const data = await res.json(); console.log(data); } catch (err) { console.error(err); } }

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: Mechanism that manages async callbacks and executes them after the call stack is empty.

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: n action like click, load, input, keypress.

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: ttach a listener to a parent to handle events on child elements.

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: Catching and managing runtime errors to prevent app crashes.

Explain a bit more

Catching and managing runtime errors to prevent app crashes. Catching and managing runtime errors to prevent app crashes. Catching and managing runtime errors to prevent app crashes. Catching and managing runtime errors to prevent app crashes. Catching and managing runtime errors to prevent app crashes. Catching and managing runtime errors to prevent app crashes. Catching and managing runtime errors to prevent app crashes.

Example code

Catching and managing runtime errors to prevent app crashes. Catching and managing runtime errors to prevent app crashes. Catching and managing runtime errors to prevent app crashes. Catching and managing runtime errors to prevent app crashes. Catching and managing runtime errors to prevent app crashes. Catching and managing runtime errors to prevent app crashes. Catching and managing runtime errors to prevent app crashes. Catching and managing runtime errors to prevent app crashes.

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: Blocks to handle exceptions. try { JSON.parse("invalid"); } catch(e) { console.error(e); }

Example code

Blocks to handle exceptions. try { JSON.parse("invalid"); } catch(e) { console.error(e); }

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