Interview Q&A

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

4616 total questions 4516 technical 100 career & HR 4346 from PDF library

Showing 101–125 of 128

Career & HR topics

By tech stack

Junior PDF
What is optional chaining?

Answer: A safe way to access nested properties without throwing an error if something is undefined or null. Example: console.log(user?.address?.city); What interviewers expect A clear definition tied to JavaScript in Jav…

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

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…

JavaScript Read answer
Junior PDF
What is lexical scoping?

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: function outer() { let name = "Sandeep…

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

Answer: Reboot is a modernized CSS reset that standardizes browser styles for consistent rendering. Follow me on LinkedIn: What interviewers expect A clear definition tied to JavaScript in JavaScript projects Trade-offs…

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

Answer: n object is a collection of key-value pairs used to store related data and functions. Example: let person = { name: "Sandeep", age: 30 }; What interviewers expect A clear definition tied to JavaScript in JavaScri…

JavaScript Read answer
Junior PDF
What is the this keyword?

this refers to the context in which a function is called. What interviewers expect A clear definition tied to JavaScript in JavaScript projects Trade-offs (performance, maintainability, security, cost) When you would and…

JavaScript Read answer
Junior PDF
What is object destructuring?

Answer: Extract values from objects into variables. Example: const person = { name: "Sandeep", age: 30 }; const { name, age } = person; console.log(name, age); // Sandeep 30 What interviewers expect A clear definition ti…

JavaScript Read answer
Junior PDF
What is array destructuring?

Answer: Extract elements from arrays into variables. Example: let [first, second] = [10, 20]; console.log(first, second); // 10 20 What interviewers expect A clear definition tied to JavaScript in JavaScript projects Tra…

JavaScript Read answer
Junior PDF
What is the spread operator?

Answer: Used to expand arrays or objects into individual elements. Example: const arr = [1, 2, 3]; const newArr = [...arr, 4, 5]; // [1, 2, 3, 4, 5] What interviewers expect A clear definition tied to JavaScript in JavaS…

JavaScript Read answer
Junior PDF
What is prototypal inheritance?

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"); } }; const child = Obje…

JavaScript Read answer
Junior PDF
What is the prototype chain?

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:…

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

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 What interviewers expect A cle…

JavaScript Read answer
Junior PDF
What is the difference between __proto__ and prototype? Property Description prototy pe

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: function Person() {} console.log(Person.prototype); //…

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

Property Description prototy 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: function Person() {} cons…

JavaScript Read answer
Junior PDF
What is the constructor method?

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; } } What interviewers expect A clear…

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

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 What interviewers expect…

JavaScript Read answer
Junior PDF
What is super()?

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

JavaScript Read answer
Junior PDF
What is asynchronous programming?

Answer: llows non-blocking execution, letting other code run while waiting for tasks (e.g., network requests). What interviewers expect A clear definition tied to JavaScript in JavaScript projects Trade-offs (performance…

JavaScript Read answer
Junior PDF
What is callback hell?

Answer: Nested callbacks causing hard-to-read code. Solution: Use Promises or async/await. What interviewers expect A clear definition tied to JavaScript in JavaScript projects Trade-offs (performance, maintainability, s…

JavaScript Read answer
Junior PDF
What is a Promise?

n object representing future completion or failure of an async task. What interviewers expect A clear definition tied to JavaScript in JavaScript projects Trade-offs (performance, maintainability, security, cost) When yo…

JavaScript Read answer
Junior PDF
What is async / await? Syntactic sugar over Promises for cleaner asynchronous code.

Answer: sync function fetchData() { try { const res = await fetch('/api/data'); const data = await res.json(); console.log(data); } catch (err) { console.error(err); } } What interviewers expect A clear definition tied t…

JavaScript Read answer
Junior PDF
What is an event loop?

Answer: Mechanism that manages async callbacks and executes them after the call stack is empty. What interviewers expect A clear definition tied to JavaScript in JavaScript projects Trade-offs (performance, maintainabili…

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

n action like click, load, input, keypress. What interviewers expect A clear definition tied to JavaScript in JavaScript projects Trade-offs (performance, maintainability, security, cost) When you would and would not use…

JavaScript Read answer
Junior PDF
What is event bubbling and capturing?

When an event occurs in a nested element: Bubbling: Event moves upward (child → parent). Capturing: Event moves downward (parent → child). Example: element.addEventListener('click', handler, true); // capturing element.a…

JavaScript Read answer
Junior PDF
What is event delegation?

ttach a listener to a parent to handle events on child elements. What interviewers expect A clear definition tied to JavaScript in JavaScript projects Trade-offs (performance, maintainability, security, cost) When you wo…

JavaScript Read answer

JavaScript JavaScript Tutorial · JavaScript

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

What interviewers expect

  • A clear definition tied to JavaScript in JavaScript projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production JavaScript application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in JavaScript architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

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

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

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:

function outer() {

let name = "Sandeep";

function inner() {

console.log(name); // accesses outer variable

}

inner();

}

outer(); // Sandeep

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

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

What interviewers expect

  • A clear definition tied to JavaScript in JavaScript projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production JavaScript application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in JavaScript architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

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

What interviewers expect

  • A clear definition tied to JavaScript in JavaScript projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production JavaScript application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in JavaScript architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

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

What interviewers expect

  • A clear definition tied to JavaScript in JavaScript projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production JavaScript application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in JavaScript architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

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

What interviewers expect

  • A clear definition tied to JavaScript in JavaScript projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production JavaScript application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in JavaScript architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

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

What interviewers expect

  • A clear definition tied to JavaScript in JavaScript projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production JavaScript application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in JavaScript architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Answer: Used to expand arrays or objects into individual elements. Example: const arr = [1, 2, 3]; const newArr = [...arr, 4, 5]; // [1, 2, 3, 4, 5]

What interviewers expect

  • A clear definition tied to JavaScript in JavaScript projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production JavaScript application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in JavaScript architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

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"); } };
const child = Object.create(parent);

child.greet(); // Hello

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

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:

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

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

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

What interviewers expect

  • A clear definition tied to JavaScript in JavaScript projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production JavaScript application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in JavaScript architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

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:

function Person() {}

console.log(Person.prototype); // prototype object

const p = new Person();

console.log(p.__proto__); // same as Person.prototype

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Property Description

prototy

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:

function Person() {}

console.log(Person.prototype); // prototype object

const p = new Person();

console.log(p.__proto__); // same as Person.prototype

🔹 6. Classes (ES6+) – Q&A

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

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; } }

What interviewers expect

  • A clear definition tied to JavaScript in JavaScript projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production JavaScript application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in JavaScript architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

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

What interviewers expect

  • A clear definition tied to JavaScript in JavaScript projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production JavaScript application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in JavaScript architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

super() calls the parent class constructor. Must be called before using this in

subclass.

Example:

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

constructor(name, breed) {

super(name);

this.breed = breed;
}
}
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Answer: llows non-blocking execution, letting other code run while waiting for tasks (e.g., network requests).

What interviewers expect

  • A clear definition tied to JavaScript in JavaScript projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production JavaScript application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in JavaScript architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Answer: Nested callbacks causing hard-to-read code. Solution: Use Promises or async/await.

What interviewers expect

  • A clear definition tied to JavaScript in JavaScript projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production JavaScript application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in JavaScript architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

n object representing future completion or failure of an async task.

What interviewers expect

  • A clear definition tied to JavaScript in JavaScript projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production JavaScript application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in JavaScript architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

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

What interviewers expect

  • A clear definition tied to JavaScript in JavaScript projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production JavaScript application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in JavaScript architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Answer: Mechanism that manages async callbacks and executes them after the call stack is empty.

What interviewers expect

  • A clear definition tied to JavaScript in JavaScript projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production JavaScript application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in JavaScript architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

n action like click, load, input, keypress.

What interviewers expect

  • A clear definition tied to JavaScript in JavaScript projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production JavaScript application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in JavaScript architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

When an event occurs in a nested element:

  • Bubbling: Event moves upward (child → parent).
  • Capturing: Event moves downward (parent → child).

Example:

element.addEventListener('click', handler, true); // capturing

element.addEventListener('click', handler, false); // bubbling

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

ttach a listener to a parent to handle events on child elements.

What interviewers expect

  • A clear definition tied to JavaScript in JavaScript projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production JavaScript application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in JavaScript architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

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