๐ฃ๐ฎ๐ ๐๐ณ๐๐ฒ๐ฟ ๐ฃ๐น๐ฎ๐ฐ๐ฒ๐บ๐ฒ๐ป๐โ๐๐ฒ๐ฐ๐ผ๐บ๐ฒ ๐ฎ ๐๐๐น๐น ๐ฆ๐๐ฎ๐ฐ๐ธ ๐๐ฒ๐๐ฒ๐น๐ผ๐ฝ๐ฒ๐ฟ ๐๐ถ๐๐ต ๐๐ฒ๐ป๐๐๐
Curriculum designed and taught by alumni from IITs & leading tech companies.
๐ Placement Highlights:-
๐ฐ โน41 LPA highest salary
๐ โน7.4 LPA average salary
๐ 2,000+ students placed
๐ข 500+ partner companies
๐ ๐๐ฝ๐ฝ๐น๐ ๐ก๐ผ๐ ๐:-
https://pdlink.in/3SuUeuD
โก Take the first step toward your dream tech career today!
Curriculum designed and taught by alumni from IITs & leading tech companies.
๐ Placement Highlights:-
๐ฐ โน41 LPA highest salary
๐ โน7.4 LPA average salary
๐ 2,000+ students placed
๐ข 500+ partner companies
๐ ๐๐ฝ๐ฝ๐น๐ ๐ก๐ผ๐ ๐:-
https://pdlink.in/3SuUeuD
โก Take the first step toward your dream tech career today!
๐ JavaScript Interview Questions with Answers โ Part 10
91. What is throttling?
Throttling limits how frequently a function can execute within a given time interval.
Even if an event fires many times, the function is allowed to execute at most once during each interval.
Example:
Common Uses:
โข Scroll events
โข Mouse movement
โข Window resizing
โข Continuous user interactions
Debounce vs Throttle:
Debounce โ Execute after activity stops
Throttle โ Execute at controlled intervals
92. What is memoization?
Memoization is an optimization technique where the result of a function is cached so that the same calculation doesn't have to be performed again.
Example:
Example Usage:
The first call performs the calculation.
The second call can use the cached result.
Benefits:
โ Faster repeated calculations
โ Avoids unnecessary work
Drawback:
โ Uses additional memory for cached results.
93. What is currying?
Currying transforms a function that takes multiple arguments into a sequence of functions that each take one argument.
Normal Function:
Curried Function:
Usage:
Output:
Arrow Function Version:
Common Uses:
โข Functional programming
โข Creating reusable functions
โข Partial application
โข Configuration-based functions
94. What is prototype inheritance?
JavaScript uses objects as the foundation of its inheritance system.
Objects can access properties and methods through their prototype chain.
Example:
Although dog doesn't directly contain speak(), it can access the method through its prototype.
Prototype Chain:
dog
โ
animal
โ
Object.prototype
โ
null
JavaScript searches this chain when a property isn't found directly on the object.
95. What is prototypal inheritance?
Prototypal inheritance is JavaScript's mechanism for allowing one object to inherit behavior from another object through the prototype chain.
Example:
Here:
student has its own study() method.
greet() comes from its prototype, person.
96. What are classes in JavaScript?
Classes provide a cleaner syntax for creating objects and implementing object-oriented programming patterns.
Classes were introduced in ES6.
Example:
91. What is throttling?
Throttling limits how frequently a function can execute within a given time interval.
Even if an event fires many times, the function is allowed to execute at most once during each interval.
Example:
function throttle(callback, delay) {
let lastTime = 0;
return function(...args) {
const now = Date.now();
if (now - lastTime >= delay) {
lastTime = now;
callback.apply(this, args);
}
};
}Common Uses:
โข Scroll events
โข Mouse movement
โข Window resizing
โข Continuous user interactions
Debounce vs Throttle:
Debounce โ Execute after activity stops
Throttle โ Execute at controlled intervals
92. What is memoization?
Memoization is an optimization technique where the result of a function is cached so that the same calculation doesn't have to be performed again.
Example:
function memoize(fn) {
const cache = new Map();
return function(n) {
if (cache.has(n)) {
return cache.get(n);
}
const result = fn(n);
cache.set(n, result);
return result;
};
}Example Usage:
function square(n) {
console.log("Calculating...");
return n * n;
}
const memoizedSquare = memoize(square);
console.log(memoizedSquare(5));
console.log(memoizedSquare(5));The first call performs the calculation.
The second call can use the cached result.
Benefits:
โ Faster repeated calculations
โ Avoids unnecessary work
Drawback:
โ Uses additional memory for cached results.
93. What is currying?
Currying transforms a function that takes multiple arguments into a sequence of functions that each take one argument.
Normal Function:
function add(a, b, c) {
return a + b + c;
}
console.log(add(1, 2, 3));Curried Function:
function add(a) {
return function(b) {
return function(c) {
return a + b + c;
};
};
}Usage:
console.log(add(1)(2)(3));
Output:
6
Arrow Function Version:
const add = a => b => c => a + b + c;
Common Uses:
โข Functional programming
โข Creating reusable functions
โข Partial application
โข Configuration-based functions
94. What is prototype inheritance?
JavaScript uses objects as the foundation of its inheritance system.
Objects can access properties and methods through their prototype chain.
Example:
const animal = {
speak() {
console.log("Animal speaks");
}
};
const dog = Object.create(animal);
dog.speak();Although dog doesn't directly contain speak(), it can access the method through its prototype.
Prototype Chain:
dog
โ
animal
โ
Object.prototype
โ
null
JavaScript searches this chain when a property isn't found directly on the object.
95. What is prototypal inheritance?
Prototypal inheritance is JavaScript's mechanism for allowing one object to inherit behavior from another object through the prototype chain.
Example:
const person = {
greet() {
console.log("Hello");
}
};
const student = Object.create(person);
student.study = function() {
console.log("Studying");
};
student.greet();
student.study();Here:
student has its own study() method.
greet() comes from its prototype, person.
96. What are classes in JavaScript?
Classes provide a cleaner syntax for creating objects and implementing object-oriented programming patterns.
Classes were introduced in ES6.
Example:
โค2
class Person {
constructor(name, age) {
this.name = name;
this.age = age;
}
greet() {
console.log(`Hello, I am ${this.name}`);
}
}
const person = new Person("Deepak", 25);
person.greet();Output:
Hello, I am Deepak
Important:
JavaScript classes are built on top of JavaScript's prototype-based inheritance.
Classes Support:
โข Constructors
โข Methods
โข Inheritance
โข Getters and setters
โข Static methods
โข Private fields
97. What is garbage collection?
Garbage collection is the automatic process of identifying and reclaiming memory that is no longer reachable or needed by a JavaScript program.
Developers don't normally manually free JavaScript objects.
Example:
let user = {
name: "Deepak"
};
user = null;If the original object is no longer reachable from the program, it can eventually become eligible for garbage collection.
Important:
Garbage collection timing is determined by the JavaScript engine. You cannot normally force it from standard JavaScript code.
98. How does JavaScript manage memory?
JavaScript automatically manages memory using mechanisms such as:
1. Memory allocation
2. Program execution
3. Garbage collection
Simplified Process:
Create value
โ
Memory allocated
โ
Program uses value
โ
Value becomes unreachable
โ
Garbage collector
โ
Memory can be reclaimed
What is a Memory Leak?
A memory leak occurs when a program unintentionally keeps references to objects that it no longer needs.
Common Causes:
โข Unremoved event listeners
โข Unnecessary global variables
โข Timers that aren't cleared
โข Large objects retained in closures
โข Growing caches without limits
Example:
const cache = [];
function addData(data) {
cache.push(data);
}
If cache keeps growing indefinitely, it can consume increasing amounts of memory.
99. What are CommonJS and ES Modules?
Both are module systems used in JavaScript applications.
CommonJS
Commonly associated with Node.js and uses require() and module.exports.
// math.js
function add(a, b) {
return a + b;
}
module.exports = { add };
Import:
const { add } = require("./math");ES Modules
The standardized JavaScript module system uses import and export.
// math.js
export function add(a, b) {
return a + b;
}
Import:
import { add } from "./math.js";Modern JavaScript development commonly uses ES Modules, while CommonJS remains important when working with existing Node.js projects.
100. What are the latest JavaScript features introduced in ES2025 and beyond?
JavaScript continues to evolve through yearly ECMAScript releases.
For ES2025 (ECMAScript 2025), notable standardized additions include:
๐ฅ Iterator Helpers
Methods such as:
iterator.map(...)iterator.filter(...)iterator.take(...)allow lazy processing of iterator values.
๐ฅ Iterator.from()
Allows an object to be converted into an iterator.
const iterator = Iterator.from([1, 2, 3]);
๐ฅ Set Methods
Modern Set operations include methods such as:
โข
union()โข
intersection()โข
difference()โข
symmetricDifference()Example:
const a = new Set([1, 2, 3]);
const b = new Set([3, 4, 5]);
const result = a.union(b);
console.log(result);
โค2
๐ฅ Regular Expression Improvements
ES2025 also introduced improvements to regular expressions, including support for enhanced Unicode-related matching capabilities.
๐ฅ Promise.try()
โ ๏ธ Important Interview Point
JavaScript features are standardized through the ECMAScript specification, and browser/Node.js support can vary by feature and version.
So when discussing "latest JavaScript," distinguish between:
Standardized features
โ Officially included in an ECMAScript release.
Proposed features
โ Still moving through the TC39 proposal process.
Runtime support
โ Whether a particular browser or Node.js version actually supports the feature.
Double Tap โค๏ธ For More
ES2025 also introduced improvements to regular expressions, including support for enhanced Unicode-related matching capabilities.
๐ฅ Promise.try()
Promise.try() provides a convenient way to turn a synchronous function call into a Promise-based operation.Promise.try(() => {
return someFunction();
});โ ๏ธ Important Interview Point
JavaScript features are standardized through the ECMAScript specification, and browser/Node.js support can vary by feature and version.
So when discussing "latest JavaScript," distinguish between:
Standardized features
โ Officially included in an ECMAScript release.
Proposed features
โ Still moving through the TC39 proposal process.
Runtime support
โ Whether a particular browser or Node.js version actually supports the feature.
Double Tap โค๏ธ For More
โค2
๐ ๐๐ฅ๐๐ ๐๐ฎ๐๐ฎ ๐๐ป๐ฎ๐น๐๐๐ถ๐ฐ๐ ๐๐ฒ๐ฟ๐๐ถ๐ณ๐ถ๐ฐ๐ฎ๐๐ถ๐ผ๐ป ๐๐ผ๐๐ฟ๐๐ฒ! ๐
Hereโs a great chance to learn valuable skills and earn a FREE Certificate ๐
โ Beginner-friendly
โ Learn Data Analytics skills
โ Free certification
โ Boost your resume & LinkedIn profile
โ Great for students & job seekers
๐๐ป๐ฟ๐ผ๐น๐น ๐๐ผ๐ฟ ๐๐ฅ๐๐๐ :-
https://pdlink.in/4qn5q94
๐ Start learning today & upgrade your career!
Hereโs a great chance to learn valuable skills and earn a FREE Certificate ๐
โ Beginner-friendly
โ Learn Data Analytics skills
โ Free certification
โ Boost your resume & LinkedIn profile
โ Great for students & job seekers
๐๐ป๐ฟ๐ผ๐น๐น ๐๐ผ๐ฟ ๐๐ฅ๐๐๐ :-
https://pdlink.in/4qn5q94
๐ Start learning today & upgrade your career!
๐๐ฅ๐๐ ๐๐ฒ๐ป๐๐ + ๐๐น๐ฎ๐๐ฑ๐ฒ ๐ข๐ป๐น๐ถ๐ป๐ฒ ๐ ๐ฎ๐๐๐ฒ๐ฟ๐ฐ๐น๐ฎ๐๐๐
Learn how to use 25+ powerful AI tools to automate your work, create professional content and save hours every week!
๐ฏ Perfect For:-
Freelancers โข Working Professionals โข Business Owners โข Self-Employed Individuals
๐ก No technical knowledge or prior experience required!
๐ ๐ฅ๐ฒ๐ด๐ถ๐๐๐ฒ๐ฟ ๐ณ๐ผ๐ฟ ๐๐ฅ๐๐ ๐:-
https://pdlinks.in/ai
โก Start using AI smarterโlimited slots available!
Learn how to use 25+ powerful AI tools to automate your work, create professional content and save hours every week!
๐ฏ Perfect For:-
Freelancers โข Working Professionals โข Business Owners โข Self-Employed Individuals
๐ก No technical knowledge or prior experience required!
๐ ๐ฅ๐ฒ๐ด๐ถ๐๐๐ฒ๐ฟ ๐ณ๐ผ๐ฟ ๐๐ฅ๐๐ ๐:-
https://pdlinks.in/ai
โก Start using AI smarterโlimited slots available!
โค3
๐ ๐๐๐๐๐ง๐ญ๐ฎ๐ซ๐ ๐
๐๐๐ ๐๐๐ซ๐ญ๐ข๐๐ข๐๐๐ญ๐ข๐จ๐ง ๐๐จ๐ฎ๐ซ๐ฌ๐๐ฌ ๐
Boost your skills with 100% FREE certification courses from Accenture!
๐ FREE Courses Offered:
1๏ธโฃ Data Processing and Visualization
2๏ธโฃ Exploratory Data Analysis
3๏ธโฃ SQL Fundamentals
4๏ธโฃ Python Basics
5๏ธโฃ Acquiring Data
๐๐ข๐ง๐ค ๐:-
https://pdlink.in/4yJKnBy
โ Learn Online | ๐ Get Certified
Boost your skills with 100% FREE certification courses from Accenture!
๐ FREE Courses Offered:
1๏ธโฃ Data Processing and Visualization
2๏ธโฃ Exploratory Data Analysis
3๏ธโฃ SQL Fundamentals
4๏ธโฃ Python Basics
5๏ธโฃ Acquiring Data
๐๐ข๐ง๐ค ๐:-
https://pdlink.in/4yJKnBy
โ Learn Online | ๐ Get Certified
๐ ๐ถ๐ฐ๐ฟ๐ผ๐๐ผ๐ณ๐ ๐ฎ๐ป๐ฑ ๐๐ถ๐ป๐ธ๐ฒ๐ฑ๐๐ป ๐๐ฅ๐๐ ๐๐ฒ๐ฟ๐๐ถ๐ณ๐ถ๐ฐ๐ฎ๐๐ถ๐ผ๐ป๐๐
Want to strengthen your resume with career-focused professional skills? Explore these free learning paths from Microsoft and LinkedIn.
๐ฅ Courses Available:
๐ Project Management
๐ Business Analysis
๐ป System Administration
๐ Data Analysis
๐ ๐๐ป๐ฟ๐ผ๐น๐น ๐ณ๐ผ๐ฟ ๐๐ฅ๐๐ ๐:-
https://pdlinks.in/micrlink
๐ก Learn โ Get Certified โ Upgrade Your Resume โ Boost Your Career
Want to strengthen your resume with career-focused professional skills? Explore these free learning paths from Microsoft and LinkedIn.
๐ฅ Courses Available:
๐ Project Management
๐ Business Analysis
๐ป System Administration
๐ Data Analysis
๐ ๐๐ป๐ฟ๐ผ๐น๐น ๐ณ๐ผ๐ฟ ๐๐ฅ๐๐ ๐:-
https://pdlinks.in/micrlink
๐ก Learn โ Get Certified โ Upgrade Your Resume โ Boost Your Career
๐๐ผ๐ผ๐ด๐น๐ฒ ๐๐ฅ๐๐ ๐๐ & ๐ ๐ฎ๐ฐ๐ต๐ถ๐ป๐ฒ ๐๐ฒ๐ฎ๐ฟ๐ป๐ถ๐ป๐ด ๐๐ผ๐๐ฟ๐๐ฒ๐ ๐
Explore Google Cloud learning resources covering AI/ML fundamentals through practical and advanced concepts.
๐ Learn AI โ Practice ML โ Build Skills โ Become Career Ready
๐ ๐๐ป๐ฟ๐ผ๐น๐น ๐ณ๐ผ๐ฟ ๐๐ฅ๐๐ ๐:-
https://pdlinks.in/eb6
๐ Learn AI โ Practice ML โ Build Skills โ Become Career Ready
Explore Google Cloud learning resources covering AI/ML fundamentals through practical and advanced concepts.
๐ Learn AI โ Practice ML โ Build Skills โ Become Career Ready
๐ ๐๐ป๐ฟ๐ผ๐น๐น ๐ณ๐ผ๐ฟ ๐๐ฅ๐๐ ๐:-
https://pdlinks.in/eb6
๐ Learn AI โ Practice ML โ Build Skills โ Become Career Ready
Free Resources to Learn Each Tech Stack ๐ง โจ
No excuses. Everything you need is free!
1. Frontend Development
โฏ freeCodeCamp.org โ HTML, CSS, JS
โฏ MDN Web Docs โ Best docs for web tech
โฏ Frontend Mentor โ Real-world challenges
โฏ CSS Tricks โ CSS deep dives
โฏ YouTube: Kevin Powell, Web Dev Simplified
โ
2. Backend Development
โฏ Node.js Docs
โฏ Django Girls Tutorial
โฏ The Odin Project โ Full Stack
โฏ Spring Boot Guides
โฏ YouTube: Amigoscode, CodeWithHarry (Hindi), Tech With Tim
โ
3. Full-Stack Development
โฏ Full Stack Open โ React + Node
โฏ The Odin Project
โฏ CS50 Web โ Harvardโs free course
โฏ YouTube: Traversy Media, Clever Programmer, JavaScript Mastery
โ
4. Data Analytics
โฏ Kaggle Learn โ Python, SQL, Viz
โฏ Maven Analytics โ Free Power BI/Tableau projects
โฏ Google Data Analytics Course
โฏ W3Schools SQL
โฏ YouTube: Luke Barousse, Alex The Analyst
โ
5. Machine Learning
โฏ Googleโs ML Crash Course
โฏ fast.ai โ Deep learning made easy
โฏ Kaggle Courses โ End-to-end ML
โฏ Coursera โ Andrew Ng
โฏ YouTube: StatQuest, Krish Naik, Codebasics
โ
6. DevOps
โฏ KodeKloud โ Docker, K8s, Ansible
โฏ Learn Git Branching
โฏ Katacoda โ Interactive Linux & DevOps
โฏ Roadmap.sh โ What to learn
โฏ YouTube: TechWorld with Nana, Nana Janashia
No excuses. Everything you need is free!
1. Frontend Development
โฏ freeCodeCamp.org โ HTML, CSS, JS
โฏ MDN Web Docs โ Best docs for web tech
โฏ Frontend Mentor โ Real-world challenges
โฏ CSS Tricks โ CSS deep dives
โฏ YouTube: Kevin Powell, Web Dev Simplified
โ
2. Backend Development
โฏ Node.js Docs
โฏ Django Girls Tutorial
โฏ The Odin Project โ Full Stack
โฏ Spring Boot Guides
โฏ YouTube: Amigoscode, CodeWithHarry (Hindi), Tech With Tim
โ
3. Full-Stack Development
โฏ Full Stack Open โ React + Node
โฏ The Odin Project
โฏ CS50 Web โ Harvardโs free course
โฏ YouTube: Traversy Media, Clever Programmer, JavaScript Mastery
โ
4. Data Analytics
โฏ Kaggle Learn โ Python, SQL, Viz
โฏ Maven Analytics โ Free Power BI/Tableau projects
โฏ Google Data Analytics Course
โฏ W3Schools SQL
โฏ YouTube: Luke Barousse, Alex The Analyst
โ
5. Machine Learning
โฏ Googleโs ML Crash Course
โฏ fast.ai โ Deep learning made easy
โฏ Kaggle Courses โ End-to-end ML
โฏ Coursera โ Andrew Ng
โฏ YouTube: StatQuest, Krish Naik, Codebasics
โ
6. DevOps
โฏ KodeKloud โ Docker, K8s, Ansible
โฏ Learn Git Branching
โฏ Katacoda โ Interactive Linux & DevOps
โฏ Roadmap.sh โ What to learn
โฏ YouTube: TechWorld with Nana, Nana Janashia
โค5
๐ง๐ผ๐ฝ ๐๐ป-๐๐ฒ๐บ๐ฎ๐ป๐ฑ ๐ฆ๐ธ๐ถ๐น๐น๐ ๐๐ผ ๐๐๐๐๐ฟ๐ฒ-๐ฃ๐ฟ๐ผ๐ผ๐ณ ๐ฌ๐ผ๐๐ฟ ๐๐ฎ๐ฟ๐ฒ๐ฒ๐ฟ ๐
๐ฅ Skills Worth Learning:
โ๏ธ Blockchain
โ๏ธ Cloud Computing
โพ๏ธ DevOps Engineering
๐ค Artificial Intelligence & Machine Learning
๐ Data Science & Analytics
๐ Cybersecurity
๐ฏ Leadership & Communication
๐๐ป๐ฟ๐ผ๐น๐น ๐๐ผ๐ฟ ๐๐ฅ๐๐๐:-
https://pdlinks.in/i89
Donโt just collect certificates โ build projects, gain practical experience and showcase your skills on your resume & LinkedIn.
๐ฅ Skills Worth Learning:
โ๏ธ Blockchain
โ๏ธ Cloud Computing
โพ๏ธ DevOps Engineering
๐ค Artificial Intelligence & Machine Learning
๐ Data Science & Analytics
๐ Cybersecurity
๐ฏ Leadership & Communication
๐๐ป๐ฟ๐ผ๐น๐น ๐๐ผ๐ฟ ๐๐ฅ๐๐๐:-
https://pdlinks.in/i89
Donโt just collect certificates โ build projects, gain practical experience and showcase your skills on your resume & LinkedIn.
โค1