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 2376–2400 of 4608

Career & HR topics

By tech stack

Popular tracks

Mid PDF
What are IIFEs (Immediately Invoked Function Expressions)?

Short answer: Functions that execute immediately after being defined. Example code (function() { console.log("Runs instantly!"); })(); Used to create private scopes before let and const. Real-world example (Sho…

JavaScript Read answer
Junior PDF
What is an event listener?

Short answer: An event listener waits for user actions (like clicks or keypresses) and runs a function when the event occurs. Example code button.addEventListener("click", () => alert("Clicked!"));…

JavaScript Read answer
Mid PDF
How does hardware acceleration work in CSS?

Short answer: GPU acceleration is triggered when you use transform, opacity, or will-change. It moves rendering to the GPU, making animations smoother. Example code .box { transform: translateZ(0); Follow me on LinkedIn:…

JavaScript Read answer
Junior PDF
What is overflow in CSS?

Short answer: Controls what happens when content exceeds the container’s size. Values: visible (default) hidden scroll auto Example code div { overflow: auto; } Key Takeaway: overflow: auto adds scrollbars only when need…

JavaScript Read answer
Mid PDF
How does the browser handle malformed HTML?

Short answer: Browsers are forgiving — they use an HTML parser that tries to fix mistakes automatically. For example, missing closing tags are inferred. Example: <p>This is valid Follow me on LinkedIn: <p>Thi…

JavaScript Read answer
Mid PDF
How can you embed a YouTube video in HTML?

Short answer: YouTube provides an embed link using <iframe>. Example code <iframe width="560" height="315" src=" allowfullscreen> </iframe> Key Takeaway: Always use the /embed/…

JavaScript Read answer
Junior PDF
What is the role of the <form> tag?

Short answer: It collects user input and sends it to a server or script for processing. Example code &lt;form action=&quot;/submit&quot; method=&quot;POST&quot;&gt; &lt;input type=&quot;text&quot; name=&quot;username&quo…

JavaScript Read answer
Junior PDF
What is function scope?

Short answer: Variables declared inside a function are accessible only within that function. Example code function demo() { let x = 10; console.log(x); // 10 } console.log(x); // ReferenceError Real-world example (ShopNe…

JavaScript Read answer
Junior PDF
What is the difference between null and undefined?

Short answer: ssigned 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 Define…

JavaScript Read answer
Mid PDF
How do you create modals using Bootstrap?

Short answer: Modals are created using the .modal class and toggled with JS or data attributes. &lt;button data-bs-toggle=&quot;modal&quot; data-bs-target=&quot;#myModal&quot;&gt;Open&lt;/button&gt; &lt;div class=&quot;m…

JavaScript Read answer
Mid PDF
How can you polyfill a feature in JavaScript?

Short answer: A polyfill is a piece of code that adds a feature missing in older browsers. Follow me on LinkedIn: Example code if (!Array.prototype.includes) { Array.prototype.includes = function(item) { return this.inde…

JavaScript Read answer
Mid PDF
What are pure functions?

Short answer: Functions that: Return the same output for the same input. Have no side effects. Example: function add(a, b) { return a + b; // pure } Example code Functions that: Return the same output for the same input.…

JavaScript Read answer
Junior PDF
What is the difference between null and undefined?

Short answer: Type Meaning null Intentional absence of value undefin ed Variable declared but not assigned Follow me on LinkedIn: Real-world example (ShopNest) ShopNest’s browser cart uses modern JavaScript: fetch APIs w…

JavaScript Read answer
Mid PDF
What are CSS Houdini APIs?

Short answer: CSS Houdini is a set of APIs that let developers extend CSS by writing code that hooks directly into the CSS engine. Explain a bit more Examples: Paint API → Custom background drawing. Layout API → Define c…

JavaScript Read answer
Mid PDF
How can you make text overflow with ellipsis?

Short answer: Use the following combination: p { width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } Key Takeaway: Truncates long text with “…” when it exceeds container width. Real-world exam…

JavaScript Read answer
Junior PDF
What is the difference between padding and margin?

Short answer: Property Location Affects Background? Padding Inside border ✅ Yes Margin Outside border ❌ No Example code div { Follow me on LinkedIn: margin: 10px; padding: 20px; } Key Takeaway: Padding = inner spacing, M…

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

Short answer: &lt;picture&gt; allows serving different image versions depending on device, screen size, or media type. Example code &lt;picture&gt; &lt;source srcset=&quot;photo-large.jpg&quot; media=&quot;(min-width: 80…

JavaScript Read answer
Junior PDF
What is the difference between <header> and <head>?

Short answer: &lt;head&gt; holds metadata (title, styles, scripts). &lt;header&gt; defines the visible top section of the page (logo, navigation, heading). Example code &lt;head&gt; &lt;title&gt;My Portfolio&lt;/title&gt…

JavaScript Read answer
Mid PDF
What are HTML entities?

Short answer: Entities display reserved characters (like &lt;, &gt;, &amp;) or symbols not on the keyboard. Example code &lt;p&gt;Use &lt;div&gt; for containers and &amp;amp; for ampersands.&lt;/p&gt; Key Takeaway: Entit…

JavaScript Read answer
Junior PDF
What is block scope?

Short answer: Variables declared with let or const inside curly braces {} are accessible only within that block. Example: if (true) { let y = 20; const z = 30; } // console.log(y, z); // ReferenceError Example code Varia…

JavaScript Read answer
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
Mid PDF
How do you comment in HTML?

Short answer: Follow me on LinkedIn: Comments are added using: &lt;!-- This is a comment --&gt; Example: &lt;!-- TODO: Add footer here --&gt; Key Takeaway: Comments help others understand your code — they don’t appear on…

JavaScript Read answer
Mid PDF
What are Bootstrap components?

Short answer: Reusable UI blocks like buttons, modals, navbars, forms, alerts, etc., that Bootstrap’s design standards. Real-world example (ShopNest) ShopNest’s browser cart uses modern JavaScript: fetch APIs with async/…

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 = &quot;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(&quot;hello&quot; / 2); // NaN Example code NaN stands for “Not-a-Number”, representing an invalid numeric oper…

JavaScript Read answer

JavaScript JavaScript Tutorial · JavaScript

Short answer: Functions that execute immediately after being defined.

Example code

(function() { console.log("Runs instantly!"); })(); Used to create private scopes before let and const.

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 event listener waits for user actions (like clicks or keypresses) and runs a function when the event occurs.

Example code

button.addEventListener("click", () => alert("Clicked!"));

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: GPU acceleration is triggered when you use transform, opacity, or will-change. It moves rendering to the GPU, making animations smoother.

Example code

.box { transform: translateZ(0); Follow me on LinkedIn: } Key Takeaway: Use GPU-friendly properties for smoother transitions; avoid triggering layout changes.

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: Controls what happens when content exceeds the container’s size. Values: visible (default) hidden scroll auto

Example code

div { overflow: auto; } Key Takeaway: overflow: auto adds scrollbars only when needed.

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: Browsers are forgiving — they use an HTML parser that tries to fix mistakes automatically. For example, missing closing tags are inferred. Example: <p>This is valid Follow me on LinkedIn: <p>This is auto-closed by browser</p> Key Takeaway: Browsers recover from errors, but writing valid HTML ensures consistent rendering.

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: YouTube provides an embed link using <iframe>.

Example code

<iframe width="560" height="315" src=" allowfullscreen> </iframe> Key Takeaway: Always use the /embed/ URL format for proper YouTube embedding.

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 collects user input and sends it to a server or script for processing.

Example code

<form action="/submit" method="POST"> <input type="text" name="username"> <button type="submit">Submit</button> </form> Key Takeaway: Forms are the foundation of user interaction on the web.

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: Variables declared inside a function are accessible only within that function.

Example code

function demo() { let x = 10; console.log(x); // 10 } console.log(x); // ReferenceError

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: ssigned 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: Modals are created using the .modal class and toggled with JS or data attributes. <button data-bs-toggle="modal" data-bs-target="#myModal">Open</button> <div class="modal fade" id="myModal"> <div class="modal-dialog"><div class="modal-content">...</div></div> </div>

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 polyfill is a piece of code that adds a feature missing in older browsers. Follow me on LinkedIn:

Example code

if (!Array.prototype.includes) { Array.prototype.includes = function(item) { return this.indexOf(item) !== -1; }; }

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: Functions that: Return the same output for the same input. Have no side effects. Example: function add(a, b) { return a + b; // pure }

Example code

Functions that: Return the same output for the same input. Have no side effects. Example: function add(a, b) { return a + b; // pure
}

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 Meaning null Intentional absence of value undefin ed Variable declared but not assigned 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: CSS Houdini is a set of APIs that let developers extend CSS by writing code that hooks directly into the CSS engine.

Explain a bit more

Examples: Paint API → Custom background drawing. Layout API → Define custom layout logic. Properties & Values API → Register custom CSS properties. Example (Paint API): registerPaint('dots', class { paint(ctx, size) { ctx.fillStyle = 'red'; ctx.arc(50, 50, 10, 0, 2 * Math.PI); ctx.fill(); } }); Key Takeaway: Houdini gives developers low-level control over how CSS works under the hood.

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: Use the following combination: p { width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } Key Takeaway: Truncates long text with “…” when it exceeds container width.

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 Location Affects Background? Padding Inside border ✅ Yes Margin Outside border ❌ No

Example code

div { Follow me on LinkedIn: margin: 10px; padding: 20px; } Key Takeaway: Padding = inner spacing, Margin = outer spacing.

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: <picture> allows serving different image versions depending on device, screen size, or media type.

Example code

<picture> <source srcset="photo-large.jpg" media="(min-width: 800px)"> <source srcset="photo-small.jpg" media="(max-width: 799px)"> <img src="photo-default.jpg" alt="Beautiful landscape"> </picture> Key Takeaway: Use <picture> for art direction — showing different images per device or context.

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: <head> holds metadata (title, styles, scripts). <header> defines the visible top section of the page (logo, navigation, heading).

Example code

<head> <title>My Portfolio</title> </head> <header> <h1>Welcome to My Portfolio</h1> </header> Follow me on LinkedIn: Key Takeaway: <head> = document info; <header> = visible header area.

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: Entities display reserved characters (like <, >, &) or symbols not on the keyboard.

Example code

<p>Use <div> for containers and &amp; for ampersands.</p> Key Takeaway: Entities prevent HTML from confusing symbols with code.

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: Variables declared with let or const inside curly braces {} are accessible only within that block. Example: if (true) { let y = 20; const z = 30; } // console.log(y, z); // ReferenceError

Example code

Variables declared with let or const inside curly braces {} are accessible only within that block. Example: if (true) {
let y = 20;
const z = 30;
} // console.log(y, z); // ReferenceError

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: 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: Follow me on LinkedIn: Comments are added using: <!-- This is a comment --> Example: <!-- TODO: Add footer here --> Key Takeaway: Comments help others understand your code — they don’t appear on the page.

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: Reusable UI blocks like buttons, modals, navbars, forms, alerts, etc., that Bootstrap’s design standards.

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