Master technical and career interviews with structured answers—short definition, real examples, pitfalls, and how to answer in 60–90 seconds.
Logical properties adapt layouts for different writing directions (LTR, RTL, vertical text). Physical Logical margin-le ft margin-inline-s tart padding-t op padding-block-s tart Example: p { padding-inline-start: 10px; /…
@keyframes define the steps of an animation over time. Example: @keyframes moveBox { 0% { left: 0; } 100% { left: 200px; } } .box { position: relative; nimation: moveBox 2s linear infinite; } Follow me on LinkedIn: Key T…
Answer: Use visibility: hidden; Example: .invisible { visibility: hidden; } Follow me on LinkedIn: Key Takeaway: Hidden = invisible but occupies space. display: none = gone completely. What interviewers expect A clear de…
The <template> tag defines reusable HTML that isn’t rendered until you activate it via JavaScript. Example: <template id="card-template"> <div class="card"> <h3></h3> <p></p> <…
<iframe> embeds another HTML page inside the current page. Example: <iframe src=" width="500" height="300"></iframe> Key Takeaway: Use iframes to display external content, but avoid excessive use for pe…
Use <table>, <tr> (row), <th> (header cell), and <td> (data cell). Example: <table border="1"> <tr> <th>Name</th> <th>Role</th> </tr> <tr> <td>…
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…
Answer: Cards are flexible content containers for images, text, and links. &lt;div class="card" style="width:18rem;"&gt; &lt;img src="..." class="card-img-top"&gt; &lt;div class="card-body"&gt;...…
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…
Answer: Functions that execute immediately after being defined. Example: (function() { console.log("Runs instantly!"); })(); Used to create private scopes before let and const. What interviewers expect A clear definition…
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…
GPU acceleration is triggered when you use transform, opacity, or will-change. It moves rendering to the GPU, making animations smoother. Example: .box { transform: translateZ(0); Follow me on LinkedIn: } Key Takeaway: U…
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…
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…
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-clos…
Answer: YouTube provides an embed link using &lt;iframe&gt;. Example: &lt;iframe width="560" height="315" src=" llowfullscreen&gt; &lt;/iframe&gt; Key Takeaway: lways use the /embed/ URL format fo…
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> &…
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…
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…
Modals are created using the .modal class and toggled with JS or data attributes. <button data-bs-toggle="modal" data-bs-target="#myModal">Open</button> <div class="modal fade" id="myModal"> <div cla…
Answer: A polyfill is a piece of code that adds a feature missing in older browsers. Follow me on LinkedIn: Example: if (!Array.prototype.includes) { rray.prototype.includes = function(item) { return this.indexOf(item) !…
Answer: Functions that: Return the same output for the same input. Have no side effects. Example: function add(a, b) { return a + b; // pure } What interviewers expect A clear definition tied to JavaScript in 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 (p…
CSS Houdini is a set of APIs that let developers extend CSS by writing code that hooks directly into the CSS engine. Examples: Paint API → Custom background drawing. Layout API → Define custom layout logic. Properties &a…
Answer: Use the following combination: p { width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } Key Takeaway: Truncates long text with “…” when it exceeds container width. What interviewers exp…
JavaScript JavaScript Tutorial · JavaScript
Logical properties adapt layouts for different writing directions (LTR, RTL, vertical text).
Physical Logical
margin-le
ft
margin-inline-s
tart
padding-t
op
padding-block-s
tart
Example:
p {
padding-inline-start: 10px; /* Works for both LTR and RTL */
}
Key Takeaway:
Logical properties make designs multilingual and direction-aware.
JavaScript JavaScript Tutorial · JavaScript
@keyframes define the steps of an animation over time.
Example:
@keyframes moveBox {
0% { left: 0; }
100% { left: 200px; }
}
.box {
position: relative;
nimation: moveBox 2s linear infinite;
}
Follow me on LinkedIn:
Key Takeaway:
Keyframes control how elements move, rotate, or fade during animation.
JavaScript JavaScript Tutorial · JavaScript
Answer: Use visibility: hidden; Example: .invisible { visibility: hidden; } Follow me on LinkedIn: Key Takeaway: Hidden = invisible but occupies space. display: none = gone completely.
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
JavaScript JavaScript Tutorial · JavaScript
The <template> tag defines reusable HTML that isn’t rendered until you activate it via
JavaScript.
Example:
<template id="card-template">
<div class="card">
<h3></h3>
<p></p>
</div>
</template>
<script>
const tmpl = document.getElementById("card-template");
const clone = tmpl.content.cloneNode(true);
clone.querySelector("h3").textContent = "HTML Tips";
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.
JavaScript JavaScript Tutorial · JavaScript
<iframe> embeds another HTML page inside the current page.
Example:
<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:
JavaScript JavaScript Tutorial · JavaScript
Use <table>, <tr> (row), <th> (header cell), and <td> (data cell).
Example:
<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.
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"));
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
JavaScript JavaScript Tutorial · JavaScript
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:
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
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
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
JavaScript JavaScript Tutorial · JavaScript
Answer: Functions that execute immediately after being defined. Example: (function() { console.log("Runs instantly!"); })(); Used to create private scopes before let and const.
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
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", () => alert("Clicked!"));
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
JavaScript JavaScript Tutorial · JavaScript
GPU acceleration is triggered when you use transform, opacity, or will-change.
It moves rendering to the GPU, making animations smoother.
Example:
.box {
transform: translateZ(0);
Follow me on LinkedIn:
}
Key Takeaway:
Use GPU-friendly properties for smoother transitions; avoid triggering layout changes.
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.
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
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.
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
JavaScript JavaScript Tutorial · JavaScript
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.
JavaScript JavaScript Tutorial · JavaScript
Answer: YouTube provides an embed link using <iframe>. Example: <iframe width="560" height="315" src=" llowfullscreen> </iframe> Key Takeaway: lways use the /embed/ URL format for proper YouTube embedding.
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
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.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
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
JavaScript JavaScript Tutorial · JavaScript
ssigned Follow me on LinkedIn:
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
JavaScript JavaScript Tutorial · JavaScript
Modals are created using the .modal class and toggled with JS or data attributes.
<button data-bs-toggle="modal"
data-bs-target="#myModal">Open</button>
<div class="modal fade" id="myModal">
<div class="modal-dialog"><div
class="modal-content">...</div></div>
</div>
JavaScript JavaScript Tutorial · JavaScript
Answer: A polyfill is a piece of code that adds a feature missing in older browsers. Follow me on LinkedIn: Example: if (!Array.prototype.includes) { rray.prototype.includes = function(item) { return this.indexOf(item) !== -1; }; }
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
JavaScript JavaScript Tutorial · JavaScript
Answer: Functions that: Return the same output for the same input. Have no side effects. Example: function add(a, b) { return a + b; // pure }
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
JavaScript JavaScript Tutorial · JavaScript
Answer: Type Meaning null Intentional absence of value undefin Variable declared but not assigned Follow me on LinkedIn:
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
JavaScript JavaScript Tutorial · JavaScript
CSS Houdini is a set of APIs that let developers extend CSS by writing code that hooks
directly into the CSS engine.
Examples:
Example (Paint API):
registerPaint('dots', class {
paint(ctx, size) {
ctx.fillStyle = 'red';
ctx.arc(50, 50, 10, 0, 2 * Math.PI);
ctx.fill();
}
});
Key Takeaway:
Houdini gives developers low-level control over how CSS works under the hood.
JavaScript JavaScript Tutorial · JavaScript
Answer: Use the following combination: p { width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } Key Takeaway: Truncates long text with “…” when it exceeds container width.
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.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.