Master technical and career interviews with structured answers—short definition, real examples, pitfalls, and how to answer in 60–90 seconds.
Answer: Promise chaining allows multiple async tasks to run sequentially. Example: fetch('/data') .then(res => res.json()) .then(data => console.log(data)) .catch(err => console.error(err)); What int…
Answer: DOM (Document Object Model) represents the structure of an HTML document as a tree of objects, allowing JavaScript to access and manipulate elements dynamically. Follow me on LinkedIn: What interviewers expect A…
<b> only makes text bold visually. <strong> adds semantic meaning (important text). Example: <b>Warning:</b> Incorrect password.<br> <strong>Warning:</strong> Incorrect password.…
Answer: function passed as an argument to another function to be executed later. Example: function greet(name, callback) { console.log(`Hello, ${name}`); callback(); } greet("Sandeep", () =&gt; console.log("Callback…
Answer: Provides consistent button styling: &lt;button class="btn btn-primary"&gt;Click&lt;/button&gt; What interviewers expect A clear definition tied to JavaScript in JavaScript projects Trade-offs (per…
Answer: JSON (JavaScript Object Notation) is a lightweight format for storing and transferring data. Example: let obj = { name: "Bob" }; let json = JSON.stringify(obj); // Convert to JSON string What interviewers expect…
<i> makes text italic for style only. <em> gives emphasis that can change meaning. Example: <i>Book titles</i> are italicized. Please <em>do not</em> touch that. Follow me on LinkedIn:…
Answer: function that: Always returns the same output for the same input Has no side effects (doesn’t modify external variables) Example: function sum(a, b) { return a + b; } What interviewers expect A clear definition t…
Answer: Method Mutates Original? Purpose slice(start, end) ❌ No Extracts portion Follow me on LinkedIn: splice(start, count, ...items) ✅ Yes Adds/removes items What interviewers expect A clear definition tied to JavaScri…
Answer: localStorage stores key-value pairs in the browser permanently (until cleared). Example: localStorage.setItem("user", "Alice"); console.log(localStorage.getItem("user")); // Alice What interviewers expect A clear…
Answer: float moves elements to the left or right — allowing text and inline elements to wrap round. Example: img { float: right; margin: 10px; } Key Takeaway: Used for text wrapping, but Flexbox/Grid is better for layou…
Answer: A favicon is the small icon shown in the browser tab. Example: &lt;link rel="icon" type="image/png" href="favicon.png"&gt; 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…
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…
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: 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: 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: 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: 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…
JavaScript JavaScript Tutorial · JavaScript
Answer: Promise chaining allows multiple async tasks to run sequentially. Example: fetch('/data') .then(res => res.json()) .then(data => console.log(data)) .catch(err => console.error(err));
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: DOM (Document Object Model) represents the structure of an HTML document as a tree of objects, allowing JavaScript to access and manipulate elements dynamically. 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
Example:
<b>Warning:</b> Incorrect password.<br>
<strong>Warning:</strong> Incorrect password.
Key Takeaway:
Use <strong> for emphasis that affects meaning.
JavaScript JavaScript Tutorial · JavaScript
Answer: function passed as an argument to another function to be executed later. Example: function greet(name, callback) { console.log(`Hello, ${name}`); callback(); } greet("Sandeep", () => console.log("Callback executed"));
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: Provides consistent button styling: <button class="btn btn-primary">Click</button>
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: JSON (JavaScript Object Notation) is a lightweight format for storing and transferring data. Example: let obj = { name: "Bob" }; let json = JSON.stringify(obj); // Convert to JSON string
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:
<i>Book titles</i> are italicized.
Please <em>do not</em> touch that.
Follow me on LinkedIn:
Key Takeaway:
<em> adds importance — <i> adds style.
JavaScript JavaScript Tutorial · JavaScript
Answer: function that: Always returns the same output for the same input Has no side effects (doesn’t modify external variables) Example: function sum(a, b) { return a + b; }
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 Mutates Original? Purpose slice(start, end) ❌ No Extracts portion Follow me on LinkedIn: splice(start, count, ...items) ✅ Yes Adds/removes 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: localStorage stores key-value pairs in the browser permanently (until cleared). Example: localStorage.setItem("user", "Alice"); console.log(localStorage.getItem("user")); // Alice
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: float moves elements to the left or right — allowing text and inline elements to wrap round. Example: img { float: right; margin: 10px; } Key Takeaway: Used for text wrapping, but Flexbox/Grid is better for layout today.
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: 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
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
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: 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: 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: 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: 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.