Interview Q&A

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

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

Showing 26–50 of 161

Popular tracks

Mid PDF
Key Takeaway:?

Use classes for reusable styles, IDs for unique elements. What interviewers expect A clear definition tied to JavaScript in JavaScript projects Trade-offs (performance, maintainability, security, cost) When you would and…

JavaScript Read answer
Mid PDF
Render Tree Creation:?

DOM + CSSOM = Render Tree (a visual structure of elements and styles). What interviewers expect A clear definition tied to JavaScript in JavaScript projects Trade-offs (performance, maintainability, security, cost) When…

JavaScript Read answer
Mid PDF
What are HTML tags and attributes?

Tags define the structure and content (e.g., <p>, <h1>, <div>). Attributes provide additional details about an element (e.g., src, href, alt). Follow me on LinkedIn: Example: <img src="logo.png" alt=…

JavaScript Read answer
Mid PDF
What are the different data types in JavaScript?

Answer: Primitive types: string, number, boolean, null, undefined, symbol, bigint Reference types: object, array, function Example: let name = "Sandeep"; let obj = { age: 30 }; What interviewers expect A clear definition…

JavaScript Read answer
Mid PDF
Garbage collects unused memory.?

✅ Result: lightning-fast execution of JS. What interviewers expect A clear definition tied to JavaScript in JavaScript projects Trade-offs (performance, maintainability, security, cost) When you would and would not use i…

JavaScript Read answer
Mid PDF
What are CSS preprocessors (SASS, LESS)?

Preprocessors extend CSS with variables, nesting, mixins, and functions, compiled into plain CSS. Example (SASS): $main-color: #3498db; .button { background: $main-color; &:hover { background: darken($main-color, 10%…

JavaScript Read answer
Mid PDF
How can you create a responsive layout with CSS Grid?

Answer: Use fractional units (fr) and media queries. Example: .container { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; } Key Takeaway: uto-fit and minmax() automatically adapt t…

JavaScript Read answer
Mid PDF
Margin → space outside the border.?

Answer: Example: div { width: 100px; padding: 10px; border: 5px solid black; margin: 20px; Key Takeaway: Total width = content + padding + border + margin. What interviewers expect A clear definition tied to JavaScript i…

JavaScript Read answer
Mid PDF
How can you optimize HTML for SEO?

SEO optimization starts with clean, structured, and semantic HTML. Best practices: Follow me on LinkedIn: Use meaningful tags (<header>, <article>, <footer>). Add <title>, <meta name="descripti…

JavaScript Read answer
Mid PDF
Layout & Painting:?

Answer: The browser calculates positions (layout) and then paints pixels on the screen. Key Takeaway: The DOM is built first, then styles are applied, and finally pixels are rendered — optimizing this pipeline improves p…

JavaScript Read answer
Mid PDF
What are variables in JavaScript?

Variables are containers to store data. Example: let age = 25; What interviewers expect A clear definition tied to JavaScript in JavaScript projects Trade-offs (performance, maintainability, security, cost) When you woul…

JavaScript Read answer
Mid PDF
Explain the concept of promises and async flow.

A Promise represents a value that may be available now, later, or never. It helps handle asynchronous operations in a cleaner way. Follow me on LinkedIn: Example: fetch('/data') .then(res => res.json()) .then(data =&g…

JavaScript Read answer
Mid PDF
How does the grid system work in Bootstrap?

Bootstrap uses a 12-column grid based on flexbox. You divide your layout using .row and .col-* classes. Follow me on LinkedIn: <div class="row"> <div class="col-6">Half</div> <div class="col-6">Ha…

JavaScript Read answer
Mid PDF
What are functions in JavaScript?

Answer: Functions are blocks of reusable code that perform a specific task. Example: function greet(name) { return `Hello, ${name}`; } What interviewers expect A clear definition tied to JavaScript in JavaScript projects…

JavaScript Read answer
Mid PDF
!important overrides all (use sparingly).?

Answer: Example: p { color: black; } /* low */ #intro { color: blue; } /* higher */ <p id="intro" style="color:red;">text</p> <!-- highest --> Key Takeaway: Use balanced specific…

JavaScript Read answer
Mid PDF
How do you use position: sticky?

Makes an element toggle between relative and fixed based on scroll position. Example: header { position: sticky; top: 0; background: white; } Follow me on LinkedIn: Key Takeaway: sticky elements stay visible within their…

JavaScript Read answer
Mid PDF
How do you create a hyperlink in HTML?

Use the <a> tag with the href attribute. Example: <a href=" target="_blank">Visit Google</a> Explanation: Follow me on LinkedIn: href specifies the link URL. target="_blank" opens it in a new tab. Key T…

JavaScript Read answer
Mid PDF
Explain the srcset and sizes attributes for <img>.

They help browsers pick the best image for the user’s device and screen size. Follow me on LinkedIn: Example: &lt;img src="small.jpg" srcset="medium.jpg 768w, large.jpg 1200w" sizes="(max-width: 768px) 100vw, 50vw" lt="L…

JavaScript Read answer
Mid PDF
What are breakpoints in Bootstrap?

Answer: Breakpoints define responsive screen widths: Breakpoint Prefix Size Extra small none &amp;lt;576px Small sm ≥576px Medium md ≥768px Large lg ≥992px Extra large xl ≥1200px XXL xxl ≥1400px What interviewers expect…

JavaScript Read answer
Mid PDF
What are web workers?

Answer: Web Workers allow JavaScript to run code in background threads, keeping the UI responsive. Example: // main.js const worker = new Worker('worker.js'); worker.postMessage('Start'); // worker.js onmessage = e =&amp…

JavaScript Read answer
Mid PDF
What are ES6 modules?

Answer: ES6 introduced modules for code reusability and organization. They use export and import keywords. Example: // math.js export function add(a, b) { return a + b; } // main.js import { add } from './math.js'; What…

JavaScript Read answer
Mid PDF
How do you handle browser compatibility issues in CSS?

✅ Common techniques: Use Autoprefixer for vendor prefixes. Use feature queries: @supports (display: grid) { .container { display: grid; } } Provide fallbacks for older browsers: background: #000; background: linear-gradi…

JavaScript Read answer
Mid PDF
What are pseudo-classes and pseudo-elements?

Pseudo-class: targets an element’s state. hover { color: red; } Pseudo-element: targets part of an element. p::first-line { font-weight: bold; } Follow me on LinkedIn: Key Takeaway: :hover changes behavior; ::before and…

JavaScript Read answer
Mid PDF
How do you make an HTML element draggable?

Add the draggable="true" attribute and use drag events in JavaScript. Example: &lt;p id="drag1" draggable="true" ondragstart="drag(event)"&gt;Drag me!&lt;/p&gt; &lt;script&gt; function drag(e) { e.dataTransfer.setData("t…

JavaScript Read answer
Mid PDF
What are semantic HTML elements? Give examples.

Semantic elements clearly describe their purpose in the document structure. Examples include: &lt;header&gt;, &lt;footer&gt;, &lt;article&gt;, &lt;nav&gt;, &lt;section&gt;. Example: &lt;article&gt; &lt;h2&gt;Breaking New…

JavaScript Read answer

JavaScript JavaScript Tutorial · JavaScript

Use classes for reusable styles, IDs for unique elements.

What interviewers expect

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

Real-world example

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

How to explain in the interview

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

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

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

DOM + CSSOM = Render Tree (a visual structure of elements and styles).

What interviewers expect

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

Real-world example

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

How to explain in the interview

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

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

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

  • Tags define the structure and content (e.g., <p>, <h1>, <div>).
  • Attributes provide additional details about an element (e.g., src, href, alt).

Follow me on LinkedIn:

Example:

<img src="logo.png" alt="Company Logo">

Here, <img> is a tag, and src & alt are attributes.

Key Takeaway:

Tags = structure; Attributes = extra information.
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Answer: Primitive types: string, number, boolean, null, undefined, symbol, bigint Reference types: object, array, function Example: let name = "Sandeep"; let obj = { age: 30 };

What interviewers expect

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

Real-world example

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

How to explain in the interview

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

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

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

✅ Result: lightning-fast execution of JS.

What interviewers expect

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

Real-world example

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

How to explain in the interview

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

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

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Preprocessors extend CSS with variables, nesting, mixins, and functions, compiled into

plain CSS.

Example (SASS):

$main-color: #3498db;

.button {

background: $main-color;

&:hover { background: darken($main-color, 10%); }

}

Key Takeaway:

Preprocessors make CSS more modular, maintainable, and reusable.

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Answer: Use fractional units (fr) and media queries. Example: .container { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; } Key Takeaway: uto-fit and minmax() automatically adapt the grid to screen size.

What interviewers expect

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

Real-world example

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

How to explain in the interview

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

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

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Answer: Example: div { width: 100px; padding: 10px; border: 5px solid black; margin: 20px; Key Takeaway: Total width = content + padding + border + margin.

What interviewers expect

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

Real-world example

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

How to explain in the interview

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

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

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

SEO optimization starts with clean, structured, and semantic HTML.

Best practices:

Follow me on LinkedIn:

  • Use meaningful tags (<header>, <article>, <footer>).
  • Add <title>, <meta name="description">, and proper heading hierarchy

(<h1> → <h6>).

  • Use descriptive alt text for images.
  • Ensure mobile-friendly and fast-loading pages.
  • Include internal linking and structured data.

Example:

<meta name="description" content="Learn web development step-by-step

with examples.">

<h1>HTML Interview Questions</h1>

Key Takeaway:

SEO-friendly HTML = clear structure + accurate metadata + accessible content.

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Answer: The browser calculates positions (layout) and then paints pixels on the screen. Key Takeaway: The DOM is built first, then styles are applied, and finally pixels are rendered — optimizing this pipeline improves page performance.

What interviewers expect

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

Real-world example

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

How to explain in the interview

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

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

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Variables are containers to store data. Example: let age = 25;

What interviewers expect

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

Real-world example

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

How to explain in the interview

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

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

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

A Promise represents a value that may be available now, later, or never.

It helps handle asynchronous operations in a cleaner way.

Follow me on LinkedIn:

Example:

fetch('/data')

.then(res => res.json())

.then(data => console.log(data))

.catch(err => console.error(err));

✅ async/await simplifies promise syntax.

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Bootstrap uses a 12-column grid based on flexbox.

You divide your layout using .row and .col-* classes.

Follow me on LinkedIn:

<div class="row">

<div class="col-6">Half</div>

<div class="col-6">Half</div>

</div>

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Answer: Functions are blocks of reusable code that perform a specific task. Example: function greet(name) { return `Hello, ${name}`; }

What interviewers expect

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

Real-world example

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

How to explain in the interview

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

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

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Answer: Example: p { color: black; } /* low */ #intro { color: blue; } /* higher */ &lt;p id="intro" style="color:red;"&gt;text&lt;/p&gt; &lt;!-- highest --&gt; Key Takeaway: Use balanced specificity; avoid overuse of !important.

What interviewers expect

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

Real-world example

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

How to explain in the interview

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

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

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Makes an element toggle between relative and fixed based on scroll position.

Example:

header {

position: sticky;

top: 0;

background: white;

}

Follow me on LinkedIn:

Key Takeaway:

sticky elements stay visible within their parent container while scrolling.

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Use the <a> tag with the href attribute.

Example:

<a href="

target="_blank">Visit Google</a>

Explanation:

Follow me on LinkedIn:

  • href specifies the link URL.
  • target="_blank" opens it in a new tab.

Key Takeaway:

lways add descriptive link text for accessibility.

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

They help browsers pick the best image for the user’s device and screen size.

Follow me on LinkedIn:

Example:

<img

src="small.jpg"

srcset="medium.jpg 768w, large.jpg 1200w"

sizes="(max-width: 768px) 100vw, 50vw"

lt="Landscape">

  • srcset defines available image files and their widths.
  • sizes tells the browser how much space the image will take on different screens.

Key Takeaway:

srcset + sizes = responsive images that load efficiently across devices.

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Answer: Breakpoints define responsive screen widths: Breakpoint Prefix Size Extra small none &lt;576px Small sm ≥576px Medium md ≥768px Large lg ≥992px Extra large xl ≥1200px XXL xxl ≥1400px

What interviewers expect

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

Real-world example

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

How to explain in the interview

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

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

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Answer: Web Workers allow JavaScript to run code in background threads, keeping the UI responsive. Example: // main.js const worker = new Worker('worker.js'); worker.postMessage('Start'); // worker.js onmessage = e =&gt; postMessage('Task done');

What interviewers expect

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

Real-world example

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

How to explain in the interview

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

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

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Answer: ES6 introduced modules for code reusability and organization. They use export and import keywords. Example: // math.js export function add(a, b) { return a + b; } // main.js import { add } from './math.js';

What interviewers expect

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

Real-world example

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

How to explain in the interview

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

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

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

✅ Common techniques:

  • Use Autoprefixer for vendor prefixes.

Use feature queries:

@supports (display: grid) {

.container { display: grid; }

}
  • Provide fallbacks for older browsers:

background: #000;

background: linear-gradient(to right, #000, #333);

  • ● Test with tools like BrowserStack.

Key Takeaway:

Graceful degradation and progressive enhancement keep CSS cross-browser safe.

Follow me on LinkedIn:

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Pseudo-class: targets an element’s state.

hover { color: red; }

  • Pseudo-element: targets part of an element.

p::first-line { font-weight: bold; }

  • Follow me on LinkedIn:

Key Takeaway:

:hover changes behavior; ::before and ::after insert content.

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Add the draggable="true" attribute and use drag events in JavaScript.

Example:

<p id="drag1" draggable="true" ondragstart="drag(event)">Drag

me!</p>

<script>

function drag(e) {

e.dataTransfer.setData("text", e.target.id);

}

</script>

Key Takeaway:

Use draggable="true" plus ondragstart and ondrop to enable drag-and-drop

functionality.

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Semantic elements clearly describe their purpose in the document structure.

Examples include: <header>, <footer>, <article>, <nav>, <section>.

Example:

<article>

<h2>Breaking News</h2>

<p>New tech trends are emerging every day.</p>

</article>

Key Takeaway:

Semantic tags improve SEO and accessibility.

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