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 551–575 of 963

Career & HR topics

By tech stack

Popular tracks

Junior PDF
What is debouncing and throttling?

Short answer: Follow me on LinkedIn: Debouncing: Executes a function after a delay of no activity. Throttling: Executes a function at regular intervals. Example (debounce): function debounce(fn, delay) { let timer; retur…

JavaScript Read answer
Junior PDF
What is the difference between static and dynamic typing?

Short answer: Static typing: Variable types are known at compile-time (e.g., TypeScript, Java). Dynamic typing: Types are determined at runtime (JavaScript). Example: let x = 10; // number Example code x = "text&quo…

JavaScript Read answer
Junior PDF
What is NaN?

Short answer: NaN stands for “Not-a-Number”, representing an invalid numeric operation. Example: console.log("hello" / 2); // NaN Example code NaN stands for “Not-a-Number”, representing an invalid numeric oper…

JavaScript Read answer
Junior PDF
What is object-fit in CSS?

Short answer: Defines how images or videos resize within their container. Follow me on LinkedIn: Example code img { width: 100%; height: 300px; object-fit: cover; } Key Takeaway: cover fills the box; contain fits the who…

JavaScript Read answer
Junior PDF
What is the difference between call stack and task queue?

Short answer: Call stack: Where function execution happens (synchronous). Task queue: Holds async callbacks (processed after stack is empty). Example code console.log("1"); setTimeout(() => console.log(&quot…

JavaScript Read answer
Junior PDF
What is the typeof operator?

Short answer: Used to find the type of a variable. typeof "Hello"; // "string" typeof 10; // "number" typeof null; // "object" (bug) Example code Used to find the type of a variabl…

JavaScript Read answer
Junior PDF
What is a CSS class selector?

Short answer: Targets elements with a specific class attribute. Example code .card { background-color: lightgray; } <div class="card">Profile</div> Follow me on LinkedIn: Key Takeaway: Classes are r…

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

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

JavaScript Read answer
Junior PDF
What is the difference between regular function and arrow function?

Short answer: Feature Regular Function Arrow Function this Dynamic Lexical (inherits from parent) Syntax function f(){} (a,b)=>a+b Can be used as constructor ✅ ❌ Example code Feature Regular Function Arrow Function th…

JavaScript Read answer
Junior PDF
What is functional programming in JavaScript?

Short answer: A style where functions are pure, stateless, and composable. Example: const double = x => x * 2; const square = x => x * x; const result = square(double(3)); // 36 Example code A style where functions…

JavaScript Read answer
Junior PDF
What is the difference between shallow copy and deep copy?

Short answer: Type Description Shallow Copy Copies top-level properties only Deep Copy Copies all nested objects too Follow me on LinkedIn: Example: const obj = { a: { b: 1 } }; Example code const shallow = { ...obj }; /…

JavaScript Read answer
Junior PDF
What is the difference between em and rem units?

Short answer: Unit Relative To Example em Parent’s font size 2em = 2 × parent font-size rem Root (<html>) font size 2rem = 2 × root font-size Example code html { font-size: 16px; } p { font-size: 2rem; } /* = 32px…

JavaScript Read answer
Junior PDF
What is the use of the alt attribute in images?

Short answer: The alt attribute provides alternative text when an image fails to load and is read by screen readers. Example code Follow me on LinkedIn: <img src="team.jpg" alt="Our development team&quo…

JavaScript Read answer
Junior PDF
What is a higher-order function?

Short answer: A function that accepts another function as a parameter or returns a function. Example: function multiplyBy(factor) { return x => x * factor; } const double = multiplyBy(2); console.log(double(5)); // 10…

JavaScript Read answer
Junior PDF
What is a promise chain?

Short answer: Promise chaining allows multiple async tasks to run sequentially. Example code fetch('/data') .then(res => res.json()) .then(data => console.log(data)) .catch(err => console.error(err)); Real-world…

JavaScript Read answer
Junior PDF
What is the DOM?

Short answer: DOM (Document Object Model) represents the structure of an HTML document as a tree of objects, allowing JavaScript to access and manipulate elements dynamically. Follow me on LinkedIn: Real-world example (S…

JavaScript Read answer
Junior PDF
What is the difference between <b> and <strong>?

Short answer: &lt;b&gt; only makes text bold visually. &lt;strong&gt; adds semantic meaning (important text). Example: &lt;b&gt;Warning:&lt;/b&gt; Incorrect password.&lt;br&gt; &lt;strong&gt;Warning:&lt;/strong&gt; Incor…

JavaScript Read answer
Junior PDF
What is a callback function?

Short answer: A function passed as an argument to another function to be executed later. Example: function greet(name, callback) { console.log(`Hello, ${name}`); callback(); } Example code greet(&quot;Sandeep&quot;, () =…

JavaScript Read answer
Junior PDF
What is the purpose of the .btn class?

Short answer: Provides consistent button styling: &lt;button class=&quot;btn btn-primary&quot;&gt;Click&lt;/button&gt; Real-world example (ShopNest) ShopNest’s browser cart uses modern JavaScript: fetch APIs with async/a…

JavaScript Read answer
Junior PDF
What is JSON?

Short answer: JSON (JavaScript Object Notation) is a lightweight format for storing and transferring data. Example: let obj = { name: &quot;Bob&quot; }; let json = JSON.stringify(obj); // Convert to JSON string Example c…

JavaScript Read answer
Junior PDF
What is the difference between <i> and <em>?

Short answer: &lt;i&gt; makes text italic for style only. &lt;em&gt; gives emphasis that can change meaning. Example: &lt;i&gt;Book titles&lt;/i&gt; are italicized. Please &lt;em&gt;do not&lt;/em&gt; touch that. Follow m…

JavaScript Read answer
Junior PDF
What is a pure function?

Short answer: A function that: Always returns the same output for the same input Has no side effects (doesn’t modify external variables) Example: function sum(a, b) { return a + b; Real-world example (ShopNest) ShopNest’…

JavaScript Read answer
Junior PDF
What is the difference between slice() and splice()?

Short answer: Method Mutates Original? Purpose slice(start, end) ❌ No Extracts portion Follow me on LinkedIn: splice(start, count, ...items) ✅ Yes Adds/removes items Real-world example (ShopNest) ShopNest’s browser cart…

JavaScript Read answer
Junior PDF
What is localStorage?

Short answer: localStorage stores key-value pairs in the browser permanently (until cleared). Example code localStorage.setItem(&quot;user&quot;, &quot;Alice&quot;); console.log(localStorage.getItem(&quot;user&quot;)); /…

JavaScript Read answer
Junior PDF
What is float and why is it used?

Short answer: float moves elements to the left or right — allowing text and inline elements to wrap around. Example code img { float: right; margin: 10px; } Key Takeaway: Used for text wrapping, but Flexbox/Grid is bette…

JavaScript Read answer

JavaScript JavaScript Tutorial · JavaScript

Short answer: Follow me on LinkedIn: Debouncing: Executes a function after a delay of no activity. Throttling: Executes a function at regular intervals. Example (debounce): function debounce(fn, delay) { let timer; return (...args) => { clearTimeout(timer); timer = setTimeout(() => fn(...args), delay); }; }

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: Static typing: Variable types are known at compile-time (e.g., TypeScript, Java). Dynamic typing: Types are determined at runtime (JavaScript). Example: let x = 10; // number

Example code

x = "text"; // allowed

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: NaN stands for “Not-a-Number”, representing an invalid numeric operation. Example: console.log("hello" / 2); // NaN

Example code

NaN stands for “Not-a-Number”, representing an invalid numeric operation. Example: console.log("hello" / 2); // NaN

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: Defines how images or videos resize within their container. Follow me on LinkedIn:

Example code

img { width: 100%; height: 300px; object-fit: cover; } Key Takeaway: cover fills the box; contain fits the whole image inside.

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: Call stack: Where function execution happens (synchronous). Task queue: Holds async callbacks (processed after stack is empty).

Example code

console.log("1"); setTimeout(() => console.log("2"), 0); console.log("3"); // Output: 1, 3, 2 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: Used to find the type of a variable. typeof "Hello"; // "string" typeof 10; // "number" typeof null; // "object" (bug)

Example code

Used to find the type of a variable. typeof "Hello"; // "string" typeof 10; // "number" typeof null; // "object" (bug)

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: Targets elements with a specific class attribute.

Example code

.card { background-color: lightgray; } <div class="card">Profile</div> Follow me on LinkedIn: Key Takeaway: Classes are reusable; use them for consistent styling across 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: When an event occurs in a nested element: Bubbling: Event moves upward (child → parent). Capturing: Event moves downward (parent → child).

Example code

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

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: Feature Regular Function Arrow Function this Dynamic Lexical (inherits from parent) Syntax function f(){} (a,b)=>a+b Can be used as constructor ✅ ❌

Example code

Feature Regular Function Arrow Function this Dynamic Lexical (inherits from parent) Syntax function f(){} (a,b)=>a+b Can be used as constructor ✅ ❌

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 style where functions are pure, stateless, and composable. Example: const double = x => x * 2; const square = x => x * x; const result = square(double(3)); // 36

Example code

A style where functions are pure, stateless, and composable. Example: const double = x => x * 2;
const square = x => x * x;
const result = square(double(3)); // 36

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 Shallow Copy Copies top-level properties only Deep Copy Copies all nested objects too Follow me on LinkedIn: Example: const obj = { a: { b: 1 } };

Example code

const shallow = { ...obj }; // same reference
const deep = JSON.parse(JSON.stringify(obj)); // new copy

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: Unit Relative To Example em Parent’s font size 2em = 2 × parent font-size rem Root (<html>) font size 2rem = 2 × root font-size

Example code

html { font-size: 16px; } p { font-size: 2rem; } /* = 32px */ Key Takeaway: Use rem for consistent sizing across the document.

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 alt attribute provides alternative text when an image fails to load and is read by screen readers.

Example code

Follow me on LinkedIn: <img src="team.jpg" alt="Our development team"> Key Takeaway: Always include meaningful alt text — it’s good for accessibility and SEO.

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 accepts another function as a parameter or returns a function. Example: function multiplyBy(factor) { return x => x * factor; } const double = multiplyBy(2); console.log(double(5)); // 10

Example code

A function that accepts another function as a parameter or returns a function. Example: function multiplyBy(factor) { return x => x * factor;
}
const double = multiplyBy(2); console.log(double(5)); // 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: Promise chaining allows multiple async tasks to run sequentially.

Example code

fetch('/data') .then(res => res.json()) .then(data => 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: DOM (Document Object Model) represents the structure of an HTML document as a tree of objects, allowing JavaScript to access and manipulate elements dynamically. 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: <b> only makes text bold visually. <strong> adds semantic meaning (important text). Example: <b>Warning:</b> Incorrect password.<br> <strong>Warning:</strong> Incorrect password. Key Takeaway: Use <strong> for emphasis that affects meaning.

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 passed as an argument to another function to be executed later. Example: function greet(name, callback) { console.log(`Hello, ${name}`); callback(); }

Example code

greet("Sandeep", () => console.log("Callback executed"));

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: Provides consistent button styling: <button class="btn btn-primary">Click</button>

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: JSON (JavaScript Object Notation) is a lightweight format for storing and transferring data. Example: let obj = { name: "Bob" }; let json = JSON.stringify(obj); // Convert to JSON string

Example code

JSON (JavaScript Object Notation) is a lightweight format for storing and transferring data. Example: let obj = { name: "Bob" };
let json = JSON.stringify(obj); // Convert to JSON string

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: <i> makes text italic for style only. <em> gives emphasis that can change meaning. Example: <i>Book titles</i> are italicized. Please <em>do not</em> touch that. Follow me on LinkedIn: Key Takeaway: <em> adds importance — <i> adds style.

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: Always returns the same output for the same input Has no side effects (doesn’t modify external variables) Example: function sum(a, b) { return a + b;

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 Mutates Original? Purpose slice(start, end) ❌ No Extracts portion Follow me on LinkedIn: splice(start, count, ...items) ✅ Yes Adds/removes items

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: localStorage stores key-value pairs in the browser permanently (until cleared).

Example code

localStorage.setItem("user", "Alice"); console.log(localStorage.getItem("user")); // Alice

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: float moves elements to the left or right — allowing text and inline elements to wrap around.

Example code

img { float: right; margin: 10px; } Key Takeaway: Used for text wrapping, but Flexbox/Grid is better for layout today.

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