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 286

Popular tracks

Junior PDF
What is the will-change property?

Short answer: It hints the browser that an element will soon change, so the browser can optimize rendering ahead of time. Example code .box { will-change: transform, opacity; } Key Takeaway: Improves animation performanc…

JavaScript Read answer
Mid PDF
How do you use calc() in CSS?

Short answer: calc() performs dynamic calculations for CSS values. Example code div { width: calc(100% - 50px); padding: calc(1em + 5px); } Follow me on LinkedIn: Key Takeaway: calc() mixes units and adjusts layouts dyna…

JavaScript Read answer
Junior PDF
What is the purpose of z-index?

Short answer: z-index controls stacking order of overlapping elements. Example code .box1 { z-index: 1; } .box2 { z-index: 10; } Higher values appear on top. Key Takeaway: Only works on positioned elements (position ≠ st…

JavaScript Read answer
Junior PDF
What is the use of the <data> tag?

Short answer: It links human-readable text with a machine-readable value — useful for analytics or scripts. Follow me on LinkedIn: Example code &lt;p&gt;Price: &lt;data value=&quot;499&quot;&gt;₹499&lt;/data&gt;&lt;/p&gt…

JavaScript Read answer
Junior PDF
What is the difference between <ol>, <ul>, and <dl>?

Short answer: &lt;ol&gt; = Ordered List (numbered) &lt;ul&gt; = Unordered List (bulleted) &lt;dl&gt; = Description List (term–definition pairs) Example: &lt;ol&gt; &lt;li&gt;HTML&lt;/li&gt; &lt;li&gt;CSS&lt;/li&gt; &lt;/…

JavaScript Read answer
Junior PDF
What is typeof operator?

Short answer: Returns the type of a variable. Example: typeof &quot;hello&quot;; // &quot;string&quot; typeof 42; // &quot;number&quot; Example code Returns the type of a variable. Example: typeof &quot;hello&quot;; // &…

JavaScript Read answer
Mid PDF
How do you include Bootstrap in your project?

Short answer: Via CDN: &lt;link href=&quot; p.min.css&quot; rel=&quot;stylesheet&quot;&gt; Or via NPM: npm install bootstrap Intermediate Real-world example (ShopNest) ShopNest’s browser cart uses modern JavaScript: fetc…

JavaScript Read answer
Junior PDF
What is the event delegation pattern?

Short answer: Instead of attaching listeners to every element, attach one listener to a parent — it captures events from its children using bubbling. Example code document.querySelector('#list').addEventListener('click',…

JavaScript Read answer
Mid PDF
What are generators?

Short answer: Generators are special functions that can pause and resume execution using the function* syntax and yield. Example: function* counter() { yield 1; yield 2; } const gen = counter(); console.log(gen.next().va…

JavaScript Read answer
Mid PDF
What are objects in JavaScript?

Short answer: Objects store data in key-value pairs. Example: const user = { name: &quot;Alice&quot;, age: 25 }; console.log(user.name); // Alice Example code Objects store data in key-value pairs. Example: const user =…

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

Short answer: == : Equality operator (converts type before comparing) === : Strict equality (no type conversion, checks type + value) Example: 5 == '5'; // true 5 === '5'; // false Example code == : Equality operator (co…

JavaScript Read answer
Junior PDF
What is CSS containment?

Short answer: contain tells the browser which aspects of an element’s rendering are independent from the rest of the document — reducing reflows and repaints. Example code .card { Follow me on LinkedIn: contain: layout p…

JavaScript Read answer
Mid PDF
How do you make a circle using CSS?

Short answer: Set equal height and width and use border-radius: 50%. Example code .circle { width: 100px; height: 100px; background: teal; border-radius: 50%; } Key Takeaway: Equal dimensions + border-radius: 50% = perfe…

JavaScript Read answer
Mid PDF
What does display: none do?

Short answer: It completely hides the element — it’s not visible and doesn’t take up space in the layout. Example code .hidden { display: none; } Key Takeaway: display: none removes the element from the document flow. Re…

JavaScript Read answer
Mid PDF
How can you handle HTML validation errors?

Short answer: Use the W3C HTML Validator to check your markup. To fix errors: Close all tags properly. Avoid duplicate ids. Ensure attributes are correctly formatted. Use only valid HTML elements. Example code ✅ Correct:…

JavaScript Read answer
Junior PDF
What is the difference between id and class attributes?

Short answer: id is unique and used for a single element. class can be used for multiple elements. Example code &lt;div id=&quot;main-header&quot;&gt;&lt;/div&gt; &lt;div class=&quot;card&quot;&gt;&lt;/div&gt; &lt;div cl…

JavaScript Read answer
Mid PDF
What does the <meta> tag do?

Short answer: The &lt;meta&gt; tag provides metadata — like page description, author, and viewport settings. Example code &lt;meta name=&quot;description&quot; content=&quot;Learn web development with real examples.&quot…

JavaScript Read answer
Mid PDF
Explain the concept of currying in JavaScript.

Short answer: Currying transforms a function that takes multiple arguments into a sequence of functions that take one argument each. Example: function add(a) { return b =&gt; a + b; Example code } console.log(add(5)(3));…

JavaScript Read answer
Junior PDF
What is the difference between .container and .container-fluid?

Short answer: .container: Fixed width, adjusts at each breakpoint. .container-fluid: Always spans 100% width. Real-world example (ShopNest) ShopNest’s browser cart uses modern JavaScript: fetch APIs with async/await, mod…

JavaScript Read answer
Mid PDF
How can you create an array in JavaScript?

Short answer: const arr1 = [1, 2, 3]; const arr2 = new Array(1, 2, 3); const arr1 = [1, 2, 3]; const arr2 = new Array(1, 2, 3); const arr1 = [1, 2, 3]; const arr2 = new Array(1, 2, 3); const arr1 = [1, 2, 3]; const arr2…

JavaScript Read answer
Junior PDF
What is the difference between logical and physical properties?

Short answer: Logical properties adapt layouts for different writing directions (LTR, RTL, vertical text). Physical Logical margin-le ft margin-inline-s tart padding-t op padding-block-s tart Example code p { padding-inl…

JavaScript Read answer
Mid PDF
What are keyframes in CSS animations?

Short answer: @keyframes define the steps of an animation over time. Example code @keyframes moveBox { 0% { left: 0; } 100% { left: 200px; } } .box { position: relative; animation: moveBox 2s linear infinite; } Follow me…

JavaScript Read answer
Mid PDF
How do you hide an element but keep its space?

Short answer: Use visibility: hidden; Example code .invisible { visibility: hidden; } Follow me on LinkedIn: Key Takeaway: Hidden = invisible but occupies space. display: none = gone completely. Real-world example (ShopN…

JavaScript Read answer
Mid PDF
What are template literals in HTML using <template> tag?

Short answer: The &lt;template&gt; tag defines reusable HTML that isn’t rendered until you activate it via JavaScript. Explain a bit more Example: &lt;template id=&quot;card-template&quot;&gt; &lt;div class=&quot;card&qu…

JavaScript Read answer
Mid PDF
How does the <iframe> element work?

Short answer: &lt;iframe&gt; embeds another HTML page inside the current page. Example code &lt;iframe src=&quot; width=&quot;500&quot; height=&quot;300&quot;&gt;&lt;/iframe&gt; Key Takeaway: Use iframes to display exter…

JavaScript Read answer

JavaScript JavaScript Tutorial · JavaScript

Short answer: It hints the browser that an element will soon change, so the browser can optimize rendering ahead of time.

Example code

.box { will-change: transform, opacity; } Key Takeaway: Improves animation performance but use carefully — too many can waste memory.

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: calc() performs dynamic calculations for CSS values.

Example code

div { width: calc(100% - 50px); padding: calc(1em + 5px); } Follow me on LinkedIn: Key Takeaway: calc() mixes units and adjusts layouts dynamically.

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: z-index controls stacking order of overlapping elements.

Example code

.box1 { z-index: 1; } .box2 { z-index: 10; } Higher values appear on top. Key Takeaway: Only works on positioned elements (position ≠ static).

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 links human-readable text with a machine-readable value — useful for analytics or scripts. Follow me on LinkedIn:

Example code

<p>Price: <data value="499">₹499</data></p> Key Takeaway: <data> helps embed structured data inside readable content.

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: <ol> = Ordered List (numbered) <ul> = Unordered List (bulleted) <dl> = Description List (term–definition pairs) Example: <ol> <li>HTML</li> <li>CSS</li> </ol> <ul> <li>Apple</li> <li>Banana</li> </ul> Follow me on LinkedIn: <dl> <dt>HTML</dt> <dd>HyperText Markup Language</dd> </dl> Key Takeaway: Choose list type based on how you want to present data.

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: Returns the type of a variable. Example: typeof "hello"; // "string" typeof 42; // "number"

Example code

Returns the type of a variable. Example: typeof "hello"; // "string" typeof 42; // "number"

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: Via CDN: <link href=" p.min.css" rel="stylesheet"> Or via NPM: npm install bootstrap Intermediate

Real-world example (ShopNest)

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

Say this in the interview

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

JavaScript JavaScript Tutorial · JavaScript

Short answer: Instead of attaching listeners to every element, attach one listener to a parent — it captures events from its children using bubbling.

Example code

document.querySelector('#list').addEventListener('click', e => { if (e.target.tagName === 'LI') console.log(e.target.textContent); }); Follow me on LinkedIn: ✅ Improves performance and memory usage.

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: Generators are special functions that can pause and resume execution using the function* syntax and yield. Example: function* counter() { yield 1; yield 2; } const gen = counter(); console.log(gen.next().value); // 1

Example code

Generators are special functions that can pause and resume execution using the function* syntax and yield. Example: function* counter() { yield 1; yield 2; }
const gen = counter(); console.log(gen.next().value); // 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: Objects store data in key-value pairs. Example: const user = { name: "Alice", age: 25 }; console.log(user.name); // Alice

Example code

Objects store data in key-value pairs. Example: const user = { name: "Alice", age: 25 }; console.log(user.name); // 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: == : Equality operator (converts type before comparing) === : Strict equality (no type conversion, checks type + value) Example: 5 == '5'; // true 5 === '5'; // false

Example code

== : Equality operator (converts type before comparing) === : Strict equality (no type conversion, checks type + value) Example: 5 == '5'; // true
5 === '5'; // false

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: contain tells the browser which aspects of an element’s rendering are independent from the rest of the document — reducing reflows and repaints.

Example code

.card { Follow me on LinkedIn: contain: layout paint; } Key Takeaway: Containment isolates elements for performance optimization.

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: Set equal height and width and use border-radius: 50%.

Example code

.circle { width: 100px; height: 100px; background: teal; border-radius: 50%; } Key Takeaway: Equal dimensions + border-radius: 50% = perfect circle.

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 completely hides the element — it’s not visible and doesn’t take up space in the layout.

Example code

.hidden { display: none; } Key Takeaway: display: none removes the element from the document flow.

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 W3C HTML Validator to check your markup. To fix errors: Close all tags properly. Avoid duplicate ids. Ensure attributes are correctly formatted. Use only valid HTML elements.

Example code

✅ Correct: <img src="logo.png" alt="Company Logo"> ❌ Incorrect: <img src="logo.png" alt=Company Logo> Follow me on LinkedIn: Key Takeaway: Clean, valid HTML ensures better rendering, SEO, and accessibility.

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: id is unique and used for a single element. class can be used for multiple elements.

Example code

<div id="main-header"></div> <div class="card"></div> <div class="card"></div> Key Takeaway: Use id for specific targeting; class for grouping and styling.

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 <meta> tag provides metadata — like page description, author, and viewport settings.

Example code

<meta name="description" content="Learn web development with real examples."> <meta name="viewport" content="width=device-width, initial-scale=1.0"> Key Takeaway: Meta tags are essential for SEO and responsive design.

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: Currying transforms a function that takes multiple arguments into a sequence of functions that take one argument each. Example: function add(a) { return b => a + b;

Example code

} console.log(add(5)(3)); // 8 ✅ Useful for function reusability and functional composition.

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: .container: Fixed width, adjusts at each breakpoint. .container-fluid: Always spans 100% 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: const arr1 = [1, 2, 3]; const arr2 = new Array(1, 2, 3); const arr1 = [1, 2, 3]; const arr2 = new Array(1, 2, 3); const arr1 = [1, 2, 3]; const arr2 = new Array(1, 2, 3); const arr1 = [1, 2, 3]; const arr2 = new Array(1, 2, 3); const arr1 = [1, 2, 3]; const arr2 = new Array(1, 2, 3); const arr1 = [1, 2, 3]; const arr2 = new Array(1, 2, 3); const arr1 = [1, 2, 3]; const arr2 = new Array(1, 2, 3); const arr1 = [1, 2,…

Example code

const arr1 = [1, 2, 3]; const arr2 = new Array(1, 2, 3); const arr1 = [1, 2, 3]; const arr2 = new Array(1, 2, 3); const arr1 = [1, 2, 3]; const arr2 = new Array(1, 2, 3); const arr1 = [1, 2, 3]; const arr2 = new Array(1, 2, 3); const arr1 = [1, 2, 3]; const arr2 = new Array(1, 2, 3); const arr1 = [1, 2, 3]; const arr2 = new Array(1, 2, 3); const arr1 = [1, 2, 3]; const arr2 = new Array(1, 2, 3); const arr1 = [1, 2, 3]; const arr2 = new Array(1, 2, 3);

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: Logical properties adapt layouts for different writing directions (LTR, RTL, vertical text). Physical Logical margin-le ft margin-inline-s tart padding-t op padding-block-s tart

Example code

p { padding-inline-start: 10px; /* Works for both LTR and RTL */ } Key Takeaway: Logical properties make designs multilingual and direction-aware.

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: @keyframes define the steps of an animation over time.

Example code

@keyframes moveBox { 0% { left: 0; } 100% { left: 200px; } } .box { position: relative; animation: moveBox 2s linear infinite; } Follow me on LinkedIn: Key Takeaway: Keyframes control how elements move, rotate, or fade during animation.

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 visibility: hidden;

Example code

.invisible { visibility: hidden; } Follow me on LinkedIn: Key Takeaway: Hidden = invisible but occupies space. display: none = gone completely.

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 <template> tag defines reusable HTML that isn’t rendered until you activate it via JavaScript.

Explain a bit more

Example: <template id="card-template"> <div class="card"> <h3></h3> <p></p> </div> </template> <script> const tmpl = document.getElementById("card-template"); clone.querySelector("p").textContent = "Use semantic tags for SEO."; document.body.appendChild(clone); </script> Key Takeaway: <template> = invisible HTML blueprint ready to be cloned dynamically.

Example code

const clone = tmpl.content.cloneNode(true);
clone.querySelector("h3").textContent = "HTML Tips";

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: <iframe> embeds another HTML page inside the current page.

Example code

<iframe src=" width="500" height="300"></iframe> Key Takeaway: Use iframes to display external content, but avoid excessive use for performance and SEO reasons. 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
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