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 1726–1750 of 3281

Career & HR topics

By tech stack

Popular tracks

Mid PDF
How do web components work?

Short answer: Web Components are reusable custom elements built with: Real-world example (ShopNest) ShopNest’s browser cart uses modern JavaScript: fetch APIs with async/await, modules, and clear error handling. Say this…

JavaScript Read answer
Mid PDF
How can you create a responsive image in HTML?

Short answer: Use CSS or the HTML5 srcset and sizes attributes. HTML Example code <img src="small.jpg" srcset="medium.jpg 768w, large.jpg 1200w" sizes="(max-width: 768px) 100vw, 50vw" alt…

JavaScript Read answer
Mid PDF
How can you include an image in HTML?

Short answer: Use the <img> tag with the src and alt attributes. Example code <img src="images/photo.jpg" alt="A sunset at the beach"> Key Takeaway: The alt attribute improves accessibilit…

JavaScript Read answer
Mid PDF
What are the falsy values in JavaScript?

Short answer: Values that evaluate to false in Boolean context: false, 0, "", null, undefined, NaN Example: if (!0) console.log("Falsy"); // prints "Falsy" Example code Values that evaluate…

JavaScript Read answer
Mid PDF
What are microdata and schema.org?

Short answer: Follow me on LinkedIn: Microdata lets you tag content with structured metadata using schema.org vocabulary, helping search engines understand your content better. Example code <div itemscope itemtype=&qu…

JavaScript Read answer
Mid PDF
What are Proxies in JavaScript?

Short answer: Proxy allows you to intercept and redefine fundamental operations on objects. Example code const user = { name: "Alice" }; const proxy = new Proxy(user, { get: (target, prop) => `${prop} ->…

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
Mid PDF
How do you include Bootstrap in your project?

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

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: "Alice", age: 25 }; console.log(user.name); // Alice Example code Objects store data in key-value pairs. Example: const user =…

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
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
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
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
Mid PDF
How do you create a table in HTML?

Short answer: Use &lt;table&gt;, &lt;tr&gt; (row), &lt;th&gt; (header cell), and &lt;td&gt; (data cell). Example code &lt;table border=&quot;1&quot;&gt; &lt;tr&gt; &lt;th&gt;Name&lt;/th&gt; &lt;th&gt;Role&lt;/th&gt; &lt;…

JavaScript Read answer
Mid PDF
What are cards in Bootstrap?

Short answer: Cards are flexible content containers for images, text, and links. &lt;div class=&quot;card&quot; style=&quot;width:18rem;&quot;&gt; &lt;img src=&quot;...&quot; class=&quot;card-img-top&quot;&gt; &lt;div cl…

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

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

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
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: &lt;p&gt;This is valid Follow me on LinkedIn: &lt;p&gt;Thi…

JavaScript Read answer

JavaScript JavaScript Tutorial · JavaScript

Short answer: Web Components are reusable custom elements built with:

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 CSS or the HTML5 srcset and sizes attributes. HTML

Example code

<img src="small.jpg" srcset="medium.jpg 768w, large.jpg 1200w" sizes="(max-width: 768px) 100vw, 50vw" alt="Mountain view"> CSS Example: img { max-width: 100%; height: auto; } Key Takeaway: Responsive images adjust to different screen sizes for faster load and better UX.

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 <img> tag with the src and alt attributes.

Example code

<img src="images/photo.jpg" alt="A sunset at the beach"> Key Takeaway: The alt attribute improves accessibility and helps 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: Values that evaluate to false in Boolean context: false, 0, "", null, undefined, NaN Example: if (!0) console.log("Falsy"); // prints "Falsy"

Example code

Values that evaluate to false in Boolean context: false, 0, "", null, undefined, NaN Example: if (!0) console.log("Falsy"); // prints "Falsy"

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: Microdata lets you tag content with structured metadata using schema.org vocabulary, helping search engines understand your content better.

Example code

<div itemscope itemtype=" <span itemprop="name"></span> <span itemprop="jobTitle">Full Stack Developer</span> </div> Key Takeaway: Microdata improves search engine understanding and enhances search results (rich snippets).

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: Proxy allows you to intercept and redefine fundamental operations on objects.

Example code

const user = { name: "Alice" }; const proxy = new Proxy(user, { get: (target, prop) => `${prop} -> ${target[prop]}` }); console.log(proxy.name); // name -> Alice ✅ Used in data validation, reactive frameworks (like Vue.js).

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

JavaScript JavaScript Tutorial · JavaScript

Short answer: Use <table>, <tr> (row), <th> (header cell), and <td> (data cell).

Example code

<table border="1"> <tr> <th>Name</th> <th>Role</th> </tr> <tr> <td>Sandeep</td> Follow me on LinkedIn: <td>Developer</td> </tr> </table> Key Takeaway: Tables are for data — not for layout.

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: Cards are flexible content containers for images, text, and links. <div class="card" style="width:18rem;"> <img src="..." class="card-img-top"> <div class="card-body">...</div> </div> 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: 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: 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: 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
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