Master technical and career interviews with structured answers—short definition, real examples, pitfalls, and how to answer in 60–90 seconds.
Answer: Use margin (m-*) and padding (p-*) utilities: <div class="p-3 m-2 text-center"></div> What interviewers expect A clear definition tied to JavaScript in JavaScript projects Trade-offs (…
Context this Refers To Follow me on LinkedIn: Global window or global Method The object owning the method Constructor The new instance Arrow function Lexical (surrounding) scope Example: const obj = { value: 10, show: fu…
Arrow functions are shorter, and they don’t have their own this, arguments, or prototype. Follow me on LinkedIn: Example: const obj = { val: 10, normal() { console.log(this.val); }, // Works rrow: () => console.log(th…
Answer: Yes. Variables inside the outer function cannot be accessed directly, only via inner functions. Example: See createCounter() above. What interviewers expect A clear definition tied to JavaScript in JavaScript pro…
Answer: Install React-Bootstrap (npm install react-bootstrap bootstrap). Import components: import { Button } from 'react-bootstrap'; <Button variant="primary">Click</Button> What interviewers…
Use try...catch inside async functions or .catch() for Promises. Example: sync function loadData() { try { const res = await fetch('/data'); return await res.json(); } catch (err) { console.error("Error:", err); } Follow…
Answer: Using try...catch...finally or Promise .catch(). Example: try { throw new Error("Something went wrong!"); } catch (err) { console.error(err.message); } finally { console.log("Cleanup code"); } Intermediate What i…
Answer: Reusable SCSS functions that generate CSS dynamically. Example: @include border-radius(10px); What interviewers expect A clear definition tied to JavaScript in JavaScript projects Trade-offs (performance, maintai…
Answer: Using object literal: {} Using new Object() constructor Example: let car = { brand: "Tesla", model: "Model 3" }; let car2 = new Object(); car2.brand = "BMW"; What interviewers expect A clear definition tied to Ja…
Answer: Wrap the table in .table-responsive: <div class="table-responsive"> <table class="table">...</table> </div> What interviewers expect A clear definition tied…
Answer: Functions defined inside objects are called methods. Example: let person = { name: "Sandeep", greet() { console.log(`Hello, ${this.name}`); } }; person.greet(); // Hello, Sandeep What interviewers expect A clear…
Answer: Import only needed components via SCSS. Use tools like PurgeCSS to remove unused classes. Use custom builds from Bootstrap’s build system. What interviewers expect A clear definition tied to JavaScript in JavaScr…
Answer: rrow: () => console.log(this.name), // undefined in global regular() { console.log(this.name); } // Sandeep }; obj.regular(); obj.arrow(); What interviewers expect A clear definition tied to JavaScript in…
Answer: Load Bootstrap first, then your custom CSS to override styles. Use namespacing or BEM methodology to prevent conflicts. Combine selectively via SCSS imports. Follow me on LinkedIn: What interviewers expect A clea…
Global function: this = window (browser) Object method: this = the object Arrow function: this = lexical context (inherits from parent scope) Example: const obj = { name: "Sandeep", arrow: () => console.log(this.name)…
rrays are ordered collections of values. Example: let numbers = [1, 2, 3, 4]; What interviewers expect A clear definition tied to JavaScript in JavaScript projects Trade-offs (performance, maintainability, security, cost…
for loop for...of forEach Example: numbers.forEach(n => console.log(n)); What interviewers expect A clear definition tied to JavaScript in JavaScript projects Trade-offs (performance, maintainability, security, co…
Objects inherit from other objects via Object.create(), constructor functions, or classes (ES6). Methods can be shared via prototypes. Example using constructor: function Person(name) { this.name = name; } Person.prototy…
Classes are blueprints for creating objects. They provide syntactic sugar over the traditional prototype-based inheritance. Example: class Person { constructor(name, age) { this.name = name; this.age = age; } } const san…
Classes support extends to create a subclass that inherits properties and methods from a parent class. Example: class Animal { speak() { console.log("Animal speaks"); } } class Dog extends Animal { speak() { console.log(…
Answer: Static methods are called on the class itself, not on instances. Example: class MathUtils { static square(x) { return x * x; } } console.log(MathUtils.square(5)); // 25 What interviewers expect A clear definition…
Yes, getters and setters control access to object properties. Example: class Person { constructor(name) { this._name = name; } get name() { return this._name; } set name(value) { this._name = value; } } const p = new Per…
A callback is a function passed as an argument to another function to be executed after some operation completes. Example: function fetchData(callback) { setTimeout(() => { callback("Data received!"); }, 1000); Follow…
pending fulfilled rejected 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…
Answer: fetch('/api/data') .then(res => res.json()) .then(data => console.log(data)) .catch(err => console.error(err)); What interviewers expect A clear definition tied to JavaScript in JavaScript pr…
JavaScript JavaScript Tutorial · JavaScript
Answer: Use margin (m-*) and padding (p-*) utilities: <div class="p-3 m-2 text-center"></div>
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
Context this Refers To
Follow me on LinkedIn:
Global window or global
Method The object owning the method
Constructor The new instance
Arrow function Lexical (surrounding) scope
Example:
const obj = {
value: 10,
show: function() { console.log(this.value); }
obj.show(); // 10
JavaScript JavaScript Tutorial · JavaScript
Arrow functions are shorter, and they don’t have their own this, arguments, or
prototype.
Follow me on LinkedIn:
Example:
const obj = {
val: 10,
normal() { console.log(this.val); }, // Works
rrow: () => console.log(this.val), // Undefined (no own this)
};
JavaScript JavaScript Tutorial · JavaScript
Answer: Yes. Variables inside the outer function cannot be accessed directly, only via inner functions. Example: See createCounter() above.
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: Install React-Bootstrap (npm install react-bootstrap bootstrap). Import components: import { Button } from 'react-bootstrap'; <Button variant="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
Use try...catch inside async functions or .catch() for Promises.
Example:
sync function loadData() {
try {
const res = await fetch('/data');
return await res.json();
} catch (err) {
console.error("Error:", err);
}
Follow me on LinkedIn:
}
dvanced
JavaScript JavaScript Tutorial · JavaScript
Answer: Using try...catch...finally or Promise .catch(). Example: try { throw new Error("Something went wrong!"); } catch (err) { console.error(err.message); } finally { console.log("Cleanup code"); } 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
Answer: Reusable SCSS functions that generate CSS dynamically. Example: @include border-radius(10px);
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: Using object literal: {} Using new Object() constructor Example: let car = { brand: "Tesla", model: "Model 3" }; let car2 = new Object(); car2.brand = "BMW";
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: Wrap the table in .table-responsive: <div class="table-responsive"> <table class="table">...</table> </div>
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 defined inside objects are called methods. Example: let person = { name: "Sandeep", greet() { console.log(`Hello, ${this.name}`); } }; person.greet(); // Hello, 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: Import only needed components via SCSS. Use tools like PurgeCSS to remove unused classes. Use custom builds from Bootstrap’s build system.
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: rrow: () => console.log(this.name), // undefined in global regular() { console.log(this.name); } // Sandeep }; obj.regular(); obj.arrow();
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: Load Bootstrap first, then your custom CSS to override styles. Use namespacing or BEM methodology to prevent conflicts. Combine selectively via SCSS imports. 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:
const obj = {
name: "Sandeep",
arrow: () => console.log(this.name), // undefined in global
regular() { console.log(this.name); } // Sandeep
obj.regular();
obj.arrow();
JavaScript JavaScript Tutorial · JavaScript
rrays are ordered collections of values. Example: let numbers = [1, 2, 3, 4];
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
for loop for...of forEach Example: numbers.forEach(n => console.log(n));
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
or classes (ES6).
Example using constructor:
function Person(name) { this.name = name; }
Person.prototype.greet = function() { console.log(`Hello
${this.name}`); };
const p = new Person("Sandeep");
p.greet(); // Hello Sandeep
JavaScript JavaScript Tutorial · JavaScript
Classes are blueprints for creating objects. They provide syntactic sugar over the
traditional prototype-based inheritance.
Example:
class Person {
constructor(name, age) {
this.name = name;
this.age = age;
}
}
const sandeep = new Person("Sandeep", 30);
console.log(sandeep.name); // Sandeep
JavaScript JavaScript Tutorial · JavaScript
Classes support extends to create a subclass that inherits properties and methods from a
parent class.
Example:
class Animal {
speak() { console.log("Animal speaks"); }
}
class Dog extends Animal {
speak() { console.log("Dog barks"); }
}
const dog = new Dog();
dog.speak(); // Dog barks
JavaScript JavaScript Tutorial · JavaScript
Answer: Static methods are called on the class itself, not on instances. Example: class MathUtils { static square(x) { return x * x; } } console.log(MathUtils.square(5)); // 25
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
Yes, getters and setters control access to object properties.
Example:
class Person {
constructor(name) { this._name = name; }
get name() { return this._name; }
set name(value) { this._name = value; }
}
const p = new Person("Sandeep");
console.log(p.name); // Sandeep
p.name = "Ravi";
console.log(p.name); // Ravi
JavaScript JavaScript Tutorial · JavaScript
A callback is a function passed as an argument to another function to be executed after
some operation completes.
Example:
function fetchData(callback) {
setTimeout(() => {
callback("Data received!");
}, 1000);
Follow me on LinkedIn:
}
fetchData(console.log);
JavaScript JavaScript Tutorial · JavaScript
pending fulfilled rejected
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: fetch('/api/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.