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 51–75 of 128

Popular tracks

Junior PDF
What is a function in JavaScript?

Answer: function is a block of reusable code that performs a task or returns a value. Example: function greet(name) { return `Hello, ${name}!`; } console.log(greet("Sandeep")); What interviewers expect A clear definition…

JavaScript Read answer
Junior PDF
What is the difference between new Object() and object literal {}?

Answer: Both create objects, but: {} is simpler and faster. new Object() is less common and can be overridden. Example: const a = {}; // Preferred const b = new Object(); // Not preferred What interviewers expect A clear…

JavaScript Read answer
Junior PDF
What is an event listener?

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

JavaScript Read answer
Junior PDF
What is the clip-path property used for?

Answer: It defines a shape that clips (hides) parts of an element. Example: .image { clip-path: circle(50% at 50% 50%); } Key Takeaway: clip-path creates creative shapes like circles, polygons, or custom SVG paths. What…

JavaScript Read answer
Junior PDF
What is overflow in CSS?

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

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

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

JavaScript Read answer
Junior PDF
What is function scope?

Answer: Variables declared inside a function are accessible only within that function. Example: function demo() { let x = 10; console.log(x); // 10 } console.log(x); // ReferenceError What interviewers expect A clear def…

JavaScript Read answer
Junior PDF
What is the difference between null and undefined? Type Meaning null Intentional absence of value undefin ed Variable declared but not

ssigned Follow me on LinkedIn: 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 produc…

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

Answer: Type Meaning null Intentional absence of value undefin Variable declared but not assigned Follow me on LinkedIn: What interviewers expect A clear definition tied to JavaScript in JavaScript projects Trade-offs (p…

JavaScript Read answer
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
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
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
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
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
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
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
Junior PDF
What is functional programming in JavaScript?

Answer: A style where functions are pure, stateless, and composable. Example: const double = x =&amp;gt; x * 2; const square = x =&amp;gt; x * x; const result = square(double(3)); // 36 What interviewers expect A clear d…

JavaScript Read answer
Junior PDF
What is the difference between shallow copy and deep copy?

Type Description Shallow Copy Copies top-level properties only Deep Copy Copies all nested objects too Follow me on LinkedIn: Example: const obj = { a: { b: 1 } }; const shallow = { ...obj }; // same reference const deep…

JavaScript Read answer
Junior PDF
What is the difference between em and rem units?

Unit Relative To Example em Parent’s font size 2em = 2 × parent font-size rem Root (&lt;html&gt;) font size 2rem = 2 × root font-size Example: html { font-size: 16px; } p { font-size: 2rem; } /* = 32px */ Key Takeaway: U…

JavaScript Read answer
Junior PDF
What is the use of the alt attribute in images?

The alt attribute provides alternative text when an image fails to load and is read by screen readers. Example: Follow me on LinkedIn: &lt;img src="team.jpg" alt="Our development team"&gt; Key Takeaway: lways include mea…

JavaScript Read answer
Junior PDF
What is a higher-order function?

Answer: function that accepts another function as a parameter or returns a function. Example: function multiplyBy(factor) { return x =&amp;gt; x * factor; } const double = multiplyBy(2); console.log(double(5)); // 10 Wha…

JavaScript Read answer

JavaScript JavaScript Tutorial · JavaScript

Answer: function is a block of reusable code that performs a task or returns a value. Example: function greet(name) { return `Hello, ${name}!`; } console.log(greet("Sandeep"));

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: Both create objects, but: {} is simpler and faster. new Object() is less common and can be overridden. Example: const a = {}; // Preferred const b = new Object(); // Not preferred

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: An event listener waits for user actions (like clicks or keypresses) and runs a function when the event occurs. Example: button.addEventListener("click", () =&gt; alert("Clicked!"));

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: It defines a shape that clips (hides) parts of an element. Example: .image { clip-path: circle(50% at 50% 50%); } Key Takeaway: clip-path creates creative shapes like circles, polygons, or custom SVG paths.

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: Controls what happens when content exceeds the container’s size. Values: visible (default) hidden scroll auto Example: div { overflow: auto; } Key Takeaway: overflow: auto adds scrollbars only when needed.

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

Example:

<form action="/submit" method="POST">

<input type="text" name="username">

<button type="submit">Submit</button>

</form>

Key Takeaway:

Forms are the foundation of user interaction on the web.
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Answer: Variables declared inside a function are accessible only within that function. Example: function demo() { let x = 10; console.log(x); // 10 } console.log(x); // 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

ssigned Follow me on LinkedIn:

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: Type Meaning null Intentional absence of value undefin Variable declared but not assigned Follow me on LinkedIn:

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

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

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

  • 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

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

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: A style where functions are pure, stateless, and composable. Example: const double = x =&gt; x * 2; const square = x =&gt; x * x; const result = square(double(3)); // 36

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

Type Description

Shallow

Copy

Copies top-level properties only

Deep Copy Copies all nested objects too

Follow me on LinkedIn:

Example:

const obj = { a: { b: 1 } };
const shallow = { ...obj }; // same reference
const deep = JSON.parse(JSON.stringify(obj)); // new copy
Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Unit Relative To Example

em Parent’s font size 2em = 2 × parent

font-size

rem Root (<html>) font

size

2rem = 2 × root font-size

Example:

html { font-size: 16px; }

p { font-size: 2rem; } /* = 32px */

Key Takeaway:

Use rem for consistent sizing across the document.

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

The alt attribute provides alternative text when an image fails to load and is read by

screen readers.

Example:

Follow me on LinkedIn:

<img src="team.jpg" alt="Our development team">

Key Takeaway:

lways include meaningful alt text — it’s good for accessibility and SEO.

Permalink & share

JavaScript JavaScript Tutorial · JavaScript

Answer: function that accepts another function as a parameter or returns a function. Example: function multiplyBy(factor) { return x =&gt; x * factor; } const double = multiplyBy(2); console.log(double(5)); // 10

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