Master technical and career interviews with structured answers—short definition, real examples, pitfalls, and how to answer in 60–90 seconds.
Answer: A favicon is the small icon shown in the browser tab. Example: <link rel="icon" type="image/png" href="favicon.png"> Key Takeaway: Favicons help brand your site in the browser. What interviewers exp…
Answer: function that calls itself until a base condition is met. Example: function factorial(n) { if (n === 0) return 1; return n * factorial(n - 1); } console.log(factorial(5)); // 120 What interviewers expect A clear…
dvanced What is the difference between order and offset classes? .order-*: Changes element order in flex containers. .offset-*: Adds left margin space in grids. <div class="col-md-4 order-2 offset-md-1"></div>…
Use Flexbox utilities: <div class="d-flex align-items-center" style="height:200px;"> <p>Vertically centered</p> </div> Advanced What is the difference between order and offset classes? .order-*: C…
Type Example Priority Microtask Promise.then, MutationObserver Higher Macrotask setTimeout, setInterval Lower Example: setTimeout(() => console.log("Macro"), 0); Promise.resolve().then(() => console.log("Micro"));…
Answer: Mutable: Can be changed after creation (e.g., arrays, objects). Immutable: Cannot be changed once created (e.g., strings, numbers). What interviewers expect A clear definition tied to JavaScript in JavaScript pro…
Answer: It allows unpacking values from arrays or objects. Example: const [a, b] = [1, 2]; const { name, age } = { name: "John", age: 30 }; What interviewers expect A clear definition tied to JavaScript in JavaScript pro…
Prefixes ensure CSS works across browsers before full support. Example: Follow me on LinkedIn: .box { webkit-border-radius: 10px; /* Chrome, Safari */ moz-border-radius: 10px; /* Firefox */ border-radius: 10px; /* Standa…
Answer: It defines the page title shown in the browser tab and search results. Example: &lt;title&gt;My Portfolio | &lt;/title&gt; Key Takeaway: Make your titles descriptive for better SEO and UX. Interme…
Parameters: variables listed in the function definition Arguments: actual values passed to the function when calling it Example: function greet(name) { // name = parameter console.log(`Hello ${name}`); } greet("Sandeep")…
Answer: An optimization technique to cache function results for repeated inputs. Example: function memoize(fn) { const cache = {}; return x =&gt; cache[x] || (cache[x] = fn(x)); } What interviewers expect A clear def…
Answer: Type Description Example Synchronous Executes line by line for loop Follow me on LinkedIn: Asynchronou Doesn’t block — runs later via callbacks, promises setTimeout, fetch() What interviewers expect A clear defin…
A closure is when a function remembers variables from its outer scope even after the outer function has finished executing. Example: function counter() { let count = 0; return function() { count++; return count; }; } con…
Answer: llowing access to outer function variables even after the outer function finishes. What interviewers expect A clear definition tied to JavaScript in JavaScript projects Trade-offs (performance, maintainability, s…
Answer: Use a custom CSS file loaded after Bootstrap. Or customize variables via SCSS before compilation. What interviewers expect A clear definition tied to JavaScript in JavaScript projects Trade-offs (performance, mai…
Answer: The period between variable declaration and initialization where it cannot be accessed. Example: console.log(x); // ReferenceError let x = 10; What interviewers expect A clear definition tied to JavaScript in Jav…
Answer: Modules are separate files that export code and import it elsewhere, ensuring encapsulation and reusability. Example: // export.js export const PI = 3.14; // import.js import { PI } from './export.js'; Follow me…
Answer: They provide default values when no argument is passed. Example: function greet(name = "Guest") { return `Hello, ${name}`; } What interviewers expect A clear definition tied to JavaScript in JavaScript projects T…
Answer: Closures work because functions remember the scope in which they were created, allowing access to outer function variables even after the outer function finishes. What interviewers expect A clear definition tied…
Answer: rrays/iterable Values for... in Objects Keys Example: for (let i in obj) console.log(i); // keys for (let v of arr) console.log(v); // values What interviewers expect A clear definition tied to JavaScript in Java…
Answer: Bootstrap 5 uses Flexbox by default for its grid system and utilities (.d-flex, .justify-content-*, .align-items-*). What interviewers expect A clear definition tied to JavaScript in JavaScript projects Trade-off…
Answer: Method Add Props Modify Delete preventExtensio ns() ❌ No ✅ Yes ✅ Yes seal() ❌ No ✅ Yes ❌ No freeze() ❌ No ❌ No ❌ No What interviewers expect A clear definition tied to JavaScript in JavaScript projects Trade-offs…
Answer: No own this No arguments object Cannot be used as constructors No super or new.target What interviewers expect A clear definition tied to JavaScript in JavaScript projects Trade-offs (performance, maintainability…
Answer: Loop Used For Iterates Over for Traditional loop Index/count for... Arrays/iterable Values for... Objects Keys Example: for (let i in obj) console.log(i); // keys for (let v of arr) console.log(v); // values What…
Data privacy / encapsulation Callbacks and event handlers Memoization / caching Module pattern for structuring code Example – private counter: function createCounter() { let count = 0; // private variable return { increm…
JavaScript JavaScript Tutorial · JavaScript
Answer: A favicon is the small icon shown in the browser tab. Example: <link rel="icon" type="image/png" href="favicon.png"> Key Takeaway: Favicons help brand your site in the browser.
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: function that calls itself until a base condition is met. Example: function factorial(n) { if (n === 0) return 1; return n * factorial(n - 1); } console.log(factorial(5)); // 120
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
dvanced
What is the difference between order and offset classes?
<div class="col-md-4 order-2 offset-md-1"></div>
Follow me on LinkedIn:
JavaScript JavaScript Tutorial · JavaScript
Use Flexbox utilities:
<div class="d-flex align-items-center" style="height:200px;">
<p>Vertically centered</p>
</div>
Advanced
What is the difference between order and offset classes?
<div class="col-md-4 order-2 offset-md-1"></div>
Follow me on LinkedIn:
JavaScript JavaScript Tutorial · JavaScript
Type Example Priority
Microtask Promise.then,
MutationObserver
Higher
Macrotask setTimeout, setInterval Lower
Example:
setTimeout(() => console.log("Macro"), 0);
Promise.resolve().then(() => console.log("Micro"));
// Output: Micro → Macro
JavaScript JavaScript Tutorial · JavaScript
Answer: Mutable: Can be changed after creation (e.g., arrays, objects). Immutable: Cannot be changed once created (e.g., strings, numbers).
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: It allows unpacking values from arrays or objects. Example: const [a, b] = [1, 2]; const { name, age } = { name: "John", age: 30 };
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
Prefixes ensure CSS works across browsers before full support.
Example:
Follow me on LinkedIn:
.box {
border-radius: 10px; /* Standard */
}
Key Takeaway:
Vendor prefixes provide cross-browser compatibility for experimental features.
IntermediateJavaScript JavaScript Tutorial · JavaScript
Answer: It defines the page title shown in the browser tab and search results. Example: <title>My Portfolio | </title> Key Takeaway: Make your titles descriptive for better SEO and UX. Intermediate
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
Example:
function greet(name) { // name = parameter
console.log(`Hello ${name}`);
}
greet("Sandeep"); // "Sandeep" = argumentJavaScript JavaScript Tutorial · JavaScript
Answer: An optimization technique to cache function results for repeated inputs. Example: function memoize(fn) { const cache = {}; return x => cache[x] || (cache[x] = fn(x)); }
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 Description Example Synchronous Executes line by line for loop Follow me on LinkedIn: Asynchronou Doesn’t block — runs later via callbacks, promises setTimeout, fetch()
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
A closure is when a function remembers variables from its outer scope even after the
outer function has finished executing.
Example:
function counter() {
let count = 0;
return function() {
count++;
return count;
};
}
const add = counter();
console.log(add()); // 1
JavaScript JavaScript Tutorial · JavaScript
Answer: llowing access to outer function variables even after the outer function finishes.
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: Use a custom CSS file loaded after Bootstrap. Or customize variables via SCSS before compilation.
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: The period between variable declaration and initialization where it cannot be accessed. Example: console.log(x); // ReferenceError let x = 10;
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: Modules are separate files that export code and import it elsewhere, ensuring encapsulation and reusability. Example: // export.js export const PI = 3.14; // import.js import { PI } from './export.js'; 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: They provide default values when no argument is passed. Example: function greet(name = "Guest") { return `Hello, ${name}`; }
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: Closures work because functions remember the scope in which they were created, allowing access to outer function variables even after the outer function finishes.
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: rrays/iterable Values for... in Objects Keys Example: for (let i in obj) console.log(i); // keys for (let v of arr) console.log(v); // values
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: Bootstrap 5 uses Flexbox by default for its grid system and utilities (.d-flex, .justify-content-*, .align-items-*).
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: Method Add Props Modify Delete preventExtensio ns() ❌ No ✅ Yes ✅ Yes seal() ❌ No ✅ Yes ❌ No freeze() ❌ No ❌ No ❌ No
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: No own this No arguments object Cannot be used as constructors No super or new.target
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: Loop Used For Iterates Over for Traditional loop Index/count for... Arrays/iterable Values for... Objects Keys Example: for (let i in obj) console.log(i); // keys for (let v of arr) console.log(v); // values
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
Example – private counter:
function createCounter() {
let count = 0; // private variable
return {
increment: () => ++count,
decrement: () => --count
};
}
const counter = createCounter();
console.log(counter.increment()); // 1
console.log(counter.decrement()); // 0