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 151–175 of 289

Career & HR topics

By tech stack

Junior PDF
What is the difference between padding and margin?

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

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

&lt;picture&gt; allows serving different image versions depending on device, screen size, or media type. Example: &lt;picture&gt; &lt;source srcset="photo-large.jpg" media="(min-width: 800px)"&gt; &lt;source srcset="phot…

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

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

JavaScript Read answer
Mid PDF
What are HTML entities?

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

JavaScript Read answer
Junior PDF
What is block scope?

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 What interviewers expect…

JavaScript Read answer
Mid PDF
What are Bootstrap components?

Answer: Reusable UI blocks like buttons, modals, navbars, forms, alerts, etc., that Bootstrap’s design standards. What interviewers expect A clear definition tied to JavaScript in JavaScript projects Trade-offs (performa…

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

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 x = "text"; // allowed What interview…

JavaScript Read answer
Junior PDF
What is NaN?

Answer: NaN stands for “Not-a-Number”, representing an invalid numeric operation. Example: console.log("hello" / 2); // NaN What interviewers expect A clear definition tied to JavaScript in JavaScript projects Trade-offs…

JavaScript Read answer
Mid PDF
How can CSS be used for accessibility improvements?

✅ Use CSS to improve readability and focus visibility: Follow me on LinkedIn: Maintain sufficient color contrast: body { color: #111; background: #fff; } Use :focus styles for keyboard users: button:focus { outline: 2px…

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

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

JavaScript Read answer
Mid PDF
What are CSS combinators?

Combinators define relationships between selectors. Combinator Description Example Descendant ( ) Any nested element div p Child (&gt;) Direct child only div &gt; djacent sibling (+) Immediately next element h1 + p Gener…

JavaScript Read answer
Mid PDF
How can you make HTML pages load faster?

Minimize HTML, CSS, and JS files. Use lazy loading for images. Use defer or async for scripts. Compress images and enable caching. Reduce DOM size. Example: Follow me on LinkedIn: &lt;script src="main.js" defer&gt;&lt;/s…

JavaScript Read answer
Mid PDF
How do you specify a language for an HTML page?

Answer: Add the lang attribute in the &amp;lt;html&amp;gt; tag. Example: &amp;lt;html lang="en"&amp;gt; Key Takeaway: Helps screen readers and search engines understand the page’s language. What interviewers expect A cle…

JavaScript Read answer
Mid PDF
What are arrow functions?

Answer: rrow functions are a shorter syntax for writing functions and do not have their own this. Example: const add = (a, b) =&amp;gt; a + b; console.log(add(2, 3)); // 5 What interviewers expect A clear definition tied…

JavaScript Read answer
Mid PDF
Explain how iframes impact performance and SEO.

Performance: Iframes load as separate browsing contexts, adding extra network requests and increasing page load time. SEO: Content inside iframes isn’t fully indexed by search engines. Links and text inside may not count…

JavaScript Read answer
Mid PDF
What are responsive images in Bootstrap?

Answer: Images that automatically scale with the parent container using .img-fluid: &amp;lt;img src="..." class="img-fluid" alt="Responsive image"&amp;gt; What interviewers expect A clear definition tied to JavaScript in…

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

Call stack: Where function execution happens (synchronous). Task queue: Holds async callbacks (processed after stack is empty). Example: console.log("1"); setTimeout(() =&gt; console.log("2"), 0); console.log("3"); // Ou…

JavaScript Read answer
Junior PDF
What is the typeof operator?

Answer: Used to find the type of a variable. typeof "Hello"; // "string" typeof 10; // "number" typeof null; // "object" (bug) What interviewers expect A clear definition tied to JavaScript in JavaScript projects Trade-o…

JavaScript Read answer
Mid PDF
How does backdrop-filter work?

It applies visual effects (like blur, brightness, or contrast) to the area behind an element. Example: .blur-bg { backdrop-filter: blur(10px); background: rgba(255, 255, 255, 0.3); } Key Takeaway: Used for modern UI effe…

JavaScript Read answer
Mid PDF
How do you use nth-child() selector?

Selects elements based on their order within a parent. Examples: li:nth-child(2) { color: red; } /* 2nd item */ li:nth-child(odd) { background: #eee; } /* odd items */ li:nth-child(3n) { font-weight: bold; } /* every 3rd…

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

Targets elements with a specific class attribute. Example: .card { background-color: lightgray; } &lt;div class="card"&gt;Profile&lt;/div&gt; Follow me on LinkedIn: Key Takeaway: Classes are reusable; use them for consis…

JavaScript Read answer
Mid PDF
What are custom data attributes (data-*)?

They allow you to store extra data on HTML elements — useful for scripts or dynamic behavior. Example: &lt;button data-user-id="101" data-role="admin"&gt;View Profile&lt;/button&gt; &lt;script&gt; const btn = document.qu…

JavaScript Read answer
Mid PDF
What are block-level and inline elements?

Block-level elements start on a new line and take full width (e.g., &lt;div&gt;, &lt;p&gt;, &lt;section&gt;). Inline elements stay within a line (e.g., &lt;span&gt;, &lt;a&gt;, &lt;strong&gt;). Example: &lt;div&gt;Block&…

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

Answer: Feature Regular Function Arrow Function this Dynamic Lexical (inherits from parent) Syntax function f(){} (a,b)=&amp;gt;a+b Can be used as constructor ✅ ❌ What interviewers expect A clear definition tied to JavaS…

JavaScript Read answer
Mid PDF
How can you customize Bootstrap themes?

Answer: Override variables using SCSS. Use Bootstrap’s Theme Customizer or utility API. Or override styles in a custom CSS file. What interviewers expect A clear definition tied to JavaScript in JavaScript projects Trade…

JavaScript Read answer

JavaScript JavaScript Tutorial · JavaScript

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

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

<picture> allows serving different image versions depending on device, screen size, or

media type.

Example:

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

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

  • <head> holds metadata (title, styles, scripts).
  • <header> defines the visible top section of the page (logo, navigation, heading).

Example:

<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.
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Entities display reserved characters (like <, >, &) or symbols not on the keyboard.

Example:

<p>Use &lt;div&gt; for containers and &amp; for ampersands.</p>

Key Takeaway:

Entities prevent HTML from confusing symbols with code.

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

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

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

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: 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 x = "text"; // allowed

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

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

✅ Use CSS to improve readability and focus visibility:

Follow me on LinkedIn:

Maintain sufficient color contrast:

body { color: #111; background: #fff; }

  • Use :focus styles for keyboard users:

button:focus { outline: 2px solid #005fcc; }

  • ● Avoid hiding content with display: none; if screen readers need it.

Respect user preferences:

@media (prefers-reduced-motion: reduce) {

* { animation: none; }

}
  • Key Takeaway:

ccessible CSS ensures inclusivity for all users — especially keyboard and screen-reader

users.

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

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

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

Combinators define relationships between selectors.

Combinator Description Example

Descendant ( ) Any nested element div p

Child (>) Direct child only div >

djacent sibling (+) Immediately next element h1 + p

General sibling (~) All next siblings h1 ~ p

Key Takeaway:

Combinators refine selector targeting.

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

  • Minimize HTML, CSS, and JS files.
  • Use lazy loading for images.
  • Use defer or async for scripts.
  • Compress images and enable caching.
  • Reduce DOM size.

Example:

Follow me on LinkedIn:

<script src="main.js" defer></script>

<img src="hero.jpg" loading="lazy" alt="Hero image">

Key Takeaway:

Speed = smaller files, fewer requests, smarter loading.

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Answer: Add the lang attribute in the &lt;html&gt; tag. Example: &lt;html lang="en"&gt; Key Takeaway: Helps screen readers and search engines understand the page’s language.

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: rrow functions are a shorter syntax for writing functions and do not have their own this. Example: const add = (a, b) =&gt; a + b; console.log(add(2, 3)); // 5

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

Performance:

  • Iframes load as separate browsing contexts, adding extra network requests and

increasing page load time.

SEO:

  • Content inside iframes isn’t fully indexed by search engines.
  • Links and text inside may not count toward the parent page’s SEO.

Best Practice:

  • Use iframes only when necessary (e.g., embedding maps or videos).
  • Add title attributes for accessibility.

Example:

<iframe src="

title="Location

Map"></iframe>

Key Takeaway:

Iframes isolate content — great for embedding, but can slow pages and weaken SEO.

Follow me on LinkedIn:

CSS Interview Questions

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Answer: Images that automatically scale with the parent container using .img-fluid: &lt;img src="..." class="img-fluid" alt="Responsive image"&gt;

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

  • Call stack: Where function execution happens (synchronous).
  • Task queue: Holds async callbacks (processed after stack is empty).

Example:

console.log("1");

setTimeout(() => console.log("2"), 0);

console.log("3");

// Output: 1, 3, 2

Follow me on LinkedIn:

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

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

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

It applies visual effects (like blur, brightness, or contrast) to the area behind an element.

Example:

.blur-bg {

backdrop-filter: blur(10px);

background: rgba(255, 255, 255, 0.3);

}

Key Takeaway:

Used for modern UI effects (like frosted glass) — supported in modern browsers only.

Follow me on LinkedIn:

JavaScript Interview Questions

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Selects elements based on their order within a parent.

Examples:

li:nth-child(2) { color: red; } /* 2nd item */

li:nth-child(odd) { background: #eee; } /* odd items */

li:nth-child(3n) { font-weight: bold; } /* every 3rd item */

Key Takeaway:

nth-child() gives you precise control over repeating patterns in lists or grids.

dvanced

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Targets elements with a specific class attribute.

Example:

.card { background-color: lightgray; }

<div class="card">Profile</div>

Follow me on LinkedIn:

Key Takeaway:

Classes are reusable; use them for consistent styling across elements.
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

They allow you to store extra data on HTML elements — useful for scripts or dynamic

behavior.

Example:

<button data-user-id="101" data-role="admin">View Profile</button>

<script>

const btn = document.querySelector("button");

console.log(btn.dataset.userId); // 101

console.log(btn.dataset.role); // admin

</script>

Key Takeaway:

data-* attributes are perfect for embedding small pieces of custom data without affecting

layout.

Follow me on LinkedIn:

dvanced

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

  • Block-level elements start on a new line and take full width (e.g., <div>, <p>,

<section>).

  • Inline elements stay within a line (e.g., <span>, <a>, <strong>).

Example:

<div>Block</div>

<span>Inline</span>

Key Takeaway:

Block = structure; Inline = styling or small content.
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

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

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: Override variables using SCSS. Use Bootstrap’s Theme Customizer or utility API. Or override styles in a custom CSS file.

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