
Domains
Agile Management
Master Agile methodologies for efficient and timely project delivery.
View All Agile Management Coursesicon-refresh-cwCertifications
Scrum Alliance
16 Hours
Best Seller
Certified ScrumMaster (CSM) CertificationScrum Alliance
16 Hours
Best Seller
Certified Scrum Product Owner (CSPO) CertificationScaled Agile
16 Hours
Trending
Leading SAFe 6.0 CertificationScrum.org
16 Hours
Professional Scrum Master (PSM) CertificationScaled Agile
16 Hours
SAFe 6.0 Scrum Master (SSM) CertificationAdvanced Certifications
Scaled Agile, Inc.
32 Hours
Recommended
Implementing SAFe 6.0 (SPC) CertificationScaled Agile, Inc.
24 Hours
SAFe 6.0 Release Train Engineer (RTE) CertificationScaled Agile, Inc.
16 Hours
Trending
SAFe® 6.0 Product Owner/Product Manager (POPM)IC Agile
24 Hours
ICP Agile Certified Coaching (ICP-ACC)Scrum.org
16 Hours
Professional Scrum Product Owner I (PSPO I) TrainingMasters
32 Hours
Trending
Agile Management Master's Program32 Hours
Agile Excellence Master's ProgramOn-Demand Courses
Agile and ScrumRoles
Scrum MasterTech Courses and Bootcamps
Full Stack Developer BootcampAccreditation Bodies
Scrum AllianceTop Resources
Scrum TutorialProject Management
Gain expert skills to lead projects to success and timely completion.
View All Project Management Coursesicon-standCertifications
PMI
36 Hours
Best Seller
Project Management Professional (PMP) CertificationAxelos
32 Hours
PRINCE2 Foundation & Practitioner CertificationAxelos
16 Hours
PRINCE2 Foundation CertificationAxelos
16 Hours
PRINCE2 Practitioner CertificationSkills
Change ManagementMasters
Job Oriented
45 Hours
Trending
Project Management Master's ProgramUniversity Programs
45 Hours
Trending
Project Management Master's ProgramOn-Demand Courses
PRINCE2 Practitioner CourseRoles
Project ManagerAccreditation Bodies
PMITop Resources
Theories of MotivationCloud Computing
Learn to harness the cloud to deliver computing resources efficiently.
View All Cloud Computing Coursesicon-cloud-snowingCertifications
AWS
32 Hours
Best Seller
AWS Certified Solutions Architect - AssociateAWS
32 Hours
AWS Cloud Practitioner CertificationAWS
24 Hours
AWS DevOps CertificationMicrosoft
16 Hours
Azure Fundamentals CertificationMicrosoft
24 Hours
Best Seller
Azure Administrator CertificationMicrosoft
45 Hours
Recommended
Azure Data Engineer CertificationMicrosoft
32 Hours
Azure Solution Architect CertificationMicrosoft
40 Hours
Azure DevOps CertificationAWS
24 Hours
Systems Operations on AWS Certification TrainingAWS
24 Hours
Developing on AWSMasters
Job Oriented
48 Hours
New
AWS Cloud Architect Masters ProgramBootcamps
Career Kickstarter
100 Hours
Trending
Cloud Engineer BootcampRoles
Cloud EngineerOn-Demand Courses
AWS Certified Developer Associate - Complete GuideAuthorized Partners of
AWSTop Resources
Scrum TutorialIT Service Management
Understand how to plan, design, and optimize IT services efficiently.
View All DevOps Coursesicon-git-commitCertifications
Axelos
16 Hours
Best Seller
ITIL 4 Foundation CertificationAxelos
16 Hours
ITIL Practitioner CertificationPeopleCert
16 Hours
ISO 14001 Foundation CertificationPeopleCert
16 Hours
ISO 20000 CertificationPeopleCert
24 Hours
ISO 27000 Foundation CertificationAxelos
24 Hours
ITIL 4 Specialist: Create, Deliver and Support TrainingAxelos
24 Hours
ITIL 4 Specialist: Drive Stakeholder Value TrainingAxelos
16 Hours
ITIL 4 Strategist Direct, Plan and Improve TrainingOn-Demand Courses
ITIL 4 Specialist: Create, Deliver and Support ExamTop Resources
ITIL Practice TestData Science
Unlock valuable insights from data with advanced analytics.
View All Data Science Coursesicon-dataBootcamps
Job Oriented
6 Months
Trending
Data Science BootcampJob Oriented
289 Hours
Data Engineer BootcampJob Oriented
6 Months
Data Analyst BootcampJob Oriented
288 Hours
New
AI Engineer BootcampSkills
Data Science with PythonRoles
Data ScientistOn-Demand Courses
Data Analysis Using ExcelTop Resources
Machine Learning TutorialDevOps
Automate and streamline the delivery of products and services.
View All DevOps Coursesicon-terminal-squareCertifications
DevOps Institute
16 Hours
Best Seller
DevOps Foundation CertificationCNCF
32 Hours
New
Certified Kubernetes AdministratorDevops Institute
16 Hours
Devops LeaderSkills
KubernetesRoles
DevOps EngineerOn-Demand Courses
CI/CD with Jenkins XGlobal Accreditations
DevOps InstituteTop Resources
Top DevOps ProjectsBI And Visualization
Understand how to transform data into actionable, measurable insights.
View All BI And Visualization Coursesicon-microscopeBI and Visualization Tools
Certification
24 Hours
Recommended
Tableau CertificationCertification
24 Hours
Data Visualization with Tableau CertificationMicrosoft
24 Hours
Best Seller
Microsoft Power BI CertificationTIBCO
36 Hours
TIBCO Spotfire TrainingCertification
30 Hours
Data Visualization with QlikView CertificationCertification
16 Hours
Sisense BI CertificationOn-Demand Courses
Data Visualization Using Tableau TrainingTop Resources
Python Data Viz LibsCyber Security
Understand how to protect data and systems from threats or disasters.
View All Cyber Security Coursesicon-refresh-cwCertifications
CompTIA
40 Hours
Best Seller
CompTIA Security+EC-Council
40 Hours
Certified Ethical Hacker (CEH v12) CertificationISACA
22 Hours
Certified Information Systems Auditor (CISA) CertificationISACA
40 Hours
Certified Information Security Manager (CISM) Certification(ISC)²
40 Hours
Certified Information Systems Security Professional (CISSP)(ISC)²
40 Hours
Certified Cloud Security Professional (CCSP) Certification16 Hours
Certified Information Privacy Professional - Europe (CIPP-E) CertificationISACA
16 Hours
COBIT5 Foundation16 Hours
Payment Card Industry Security Standards (PCI-DSS) CertificationOn-Demand Courses
CISSPTop Resources
Laptops for IT SecurityWeb Development
Learn to create user-friendly, fast, and dynamic web applications.
View All Web Development Coursesicon-codeBootcamps
Career Kickstarter
6 Months
Best Seller
Full-Stack Developer BootcampJob Oriented
3 Months
Best Seller
UI/UX Design BootcampEnterprise Recommended
6 Months
Java Full Stack Developer BootcampCareer Kickstarter
490+ Hours
Front-End Development BootcampCareer Accelerator
4 Months
Backend Development Bootcamp (Node JS)Skills
ReactOn-Demand Courses
Angular TrainingTop Resources
Top HTML ProjectsBlockchain
Understand how transactions and databases work in blockchain technology.
View All Blockchain Coursesicon-stop-squareBlockchain Certifications
40 Hours
Blockchain Professional Certification32 Hours
Blockchain Solutions Architect Certification32 Hours
Blockchain Security Engineer Certification24 Hours
Blockchain Quality Engineer Certification5+ Hours
Blockchain 101 CertificationOn-Demand Courses
NFT Essentials 101: A Beginner's GuideTop Resources
Blockchain Interview QsProgramming
Learn to code efficiently and design software that solves problems.
View All Programming Coursesicon-codeSkills
Python CertificationInterview Prep
Career Accelerator
3 Months
Software Engineer Interview PrepOn-Demand Courses
Data Structures and Algorithms with JavaScriptTop Resources
Python TutorialWeb Development
4.7 Rating 68 Questions 30 mins read7 Readers

In JavaScript, event capturing and event bubbling is two different ways that events can propagate through the Document Object Model (DOM). Event capturing is the process by which an event travels from the top of the DOM down to the target element, while event bubbling is the process by which an event travels from the target element up to the top of the DOM.
Both event capturing and event bubbling allow you to attach multiple event listeners to a single element and control the order in which they are executed. This can be useful for creating complex event-driven applications.
Here is an example of how event capturing and event bubbling work:
<div id="outer"> <div id="inner"><button>Click me</button></div> </div>
In this example, the button is the target element. If the button is clicked, the event will first be captured by the inner element, then by the outer element.
If we attach an event listener to the outer element using the addEventListener method and set the useCapture option to true, the event will be captured by the outer element first and then trickle down to the inner element.
This is an example of event capturing.
document.getElementById('outer').addEventListener('click', function(event) {
console.log('Outer element clicked');
}, true); This is one of the most frequently asked Front-end interview questions.
JavaScript allows us to check the empty state of an object by using the Object.keys() method, which returns an array of the object's own enumerable properties. If the object has no properties, the Object.keys() method will return an empty array.
We can use the length property of the array returned by Object.keys() to check if the object is empty or not. If the length of the array is 0, the object is empty.
Here is an example of how to check if an object is empty in JavaScript:
function isObjectEmpty(obj) { return Object.keys(obj).length === 0; } var obj = {}; console.log(isObjectEmpty(obj)); // Output: true obj = { a: 10, b: 12 }; console.log(isObjectEmpty(obj)); // Output: false
console.log(2 + true); console.log(true + ‘2’);
In JavaScript, boolean values are treated as numbers when used in arithmetic operations. true is treated as the number 1, and false is treated as the number 0. Therefore, the + operator performs addition and returns the sum of 2 and 1, which is 3.
In this case, the operands are the boolean value true and the string "2". Since one of the operands is a string, the + operator concatenates them, resulting in the string "true2".
A callback function in JavaScript is a function that is passed as an argument to another function and is executed after the latter function has completed its execution. Callback functions are commonly used in JavaScript and other programming languages to perform certain actions after an event has occurred or to execute a function asynchronously.
For example, a callback function may be passed as an argument to an event listener function, which will execute the callback function when the specified event occurs. Callback functions are often used to perform tasks that may take a long time to complete, such as making an HTTP request or reading from a file without blocking the main execution thread.
Expect to come across this, one of the most popular UI developer interview questions.
CSS selectors are used to select elements on an HTML page and apply styles to them. There are various types of CSS selectors, including element selectors, class selectors, and ID selectors, which can be used to select elements based on their tag name, class name, or ID, respectively.
Some examples of CSS selectors:
The factorial function uses a recursive approach to calculate the factorial of a given number. It returns n * factorial(n - 1) until it reaches the base case, at which point it returns 1.
function factorial(n) {
if (n === 0) {
return 1;
}
return n * factorial(n - 1);
}
console.log(factorial(5)); // outputs 120
Below are some intermediate level interview questions that will help you prepare well.
When we clone an object in JavaScript, we can either create a deep copy or a shallow copy.

Shallow Copy: A shallow copy of the referenced object is created when a reference variable is copied into a new reference variable using the assignment operator. An old reference variable's value is assigned to a new reference variable by copying its address. As a result, both the old and new reference variables refer to the same object in memory. Therefore, if any one of the reference variables changes, it will affect both.
// Code Snippet for Shallow Copy var employee = { ename: "abc", salary: 50000 } console.log(employee); // {ename: “abc”, salary: “5000”} var newEmployee = employee; // Shallow copy console.log(newEmployee); // {ename: “abc”, salary: “5000”} newEmployee.ename = "xyz"; console.log(employee); // {ename: “xyz”, salary: “5000”} console.log(newEmployee); // {ename: “xyz”, salary: “5000”} // ename of employee and newEmployee both are changed.
Deep Copy: In contrast to shallow copies, deep copies make copies of all the members of an object, allocate separate memory locations for the new object, and then assign the copied members to it. Hence, both the objects are independent from one another and any changes to either one will not affect the other. JSON.parse() and JSON.stringify() allow us to deep copy objects in JavaScript.
When the object has serializable properties and is small, this method is useful. However, if the object is very large and contains certain non-serializable properties, data loss may occur. So, CloneDeep() Method from Lodash library is the better way to deep clone the object.
A common occurrence in Front-end developer questions, don't miss this one.
One of the most frequently posed junior Front-end developer interview questions, be ready for it.
Arrow functions are a shorthand syntax for defining functions in JavaScript. They are similar to regular functions but have a shorter syntax and some differences in behaviour.
One of the main benefits of using arrow functions is that they can help reduce the amount of code we need to write.
For example, we can define a function with a single statement and no function keyword or curly braces:
const add = (a, b) => a + b;
This is equivalent to:
const add = function(a, b) {
return a + b;
}; Arrow functions also have a lexical this value, which means that this value inside the function is the same as the value outside the function. This can be useful when we need to access this inside a callback function, For example;
const obj = {
message: 'Hello',
sayHello: () => {
console.log(this.message);
}
};
obj.sayHello(); // logs "Hello" This is different from regular functions, where the value of this is determined by how the function is called.
A pure function is a function that has the following properties:
Pure functions have several benefits:
It is generally a good idea to write pure functions whenever possible, as they can help to make your code more predictable, maintainable, and efficient.
A staple in Front-end interview questions and answers, be prepared to answer this one.
A closure is a function that has access to the variables in its lexical scope, even when it is executed outside of that scope. Closures are created every time a function is defined inside another function. The inner function has access to the variables and parameters of the outer function, even after the outer function has returned.
Example:
function outerFunction(x) {
let y = x;
function innerFunction() {
console.log(y)
}
return innerFunction;
}
const myClosure = outerFunction(5);
myClosure(); // logs 5 In this example, the innerFunction has access to the y variable, even though it is defined and executed outside the outerFunction. This is because innerFunction is a closure that has access to the variables in its lexical scope.
Closures are often used to create private variables and functions that can only be accessed from within a specific scope. They can also be used to keep track of the state and create callback functions that have access to that state.
Overall, closures are an important and powerful concept in JavaScript, and they are often used to create more modular and maintainable code.
In HTML, a webpage can be displayed in either standards mode or quirks mode. These modes determine how a webpage is rendered by a web browser, and they can affect the way the webpage looks and behaves.
Standards mode is the preferred mode for rendering webpages, as it follows the standards set by the World Wide Web Consortium (W3C) for HTML, CSS, and other web technologies. When a webpage is displayed in standards mode, the web browser follows the standards specified in the HTML and CSS code, which ensures that the webpage is displayed consistently across different browsers.
Quirks mode, on the other hand, is a way for web browsers to handle older or improperly coded webpages. When a webpage is displayed in quirks mode, the web browser uses a different set of rules to try to display the webpage correctly. These rules are based on the way web browsers used to handle webpages in the past, and they can cause the webpage to be displayed differently in different browsers.
To determine which mode to use, web browsers look at the HTML code of the webpage and check for certain tags or attributes that indicate which mode to use.
For example, if the webpage includes a <!DOCTYPE> declaration at the top of the HTML code, the browser will use standards mode. If the <!DOCTYPE> declaration is missing or incorrect, the browser will use quirks mode.
Webpack is a module bundler for modern JavaScript applications. It is a powerful tool used by developers to write and organize their code in a modular manner, and then bundle it together into a single file (or a few files) that a web browser can load.
One of the main benefits of using webpack is that it allows developers to use the latest JavaScript features and syntax, even if the user's web browser does not support those features. Webpack also offers a range of other features and capabilities, such as:
There are several ways to reduce the page load time of a website or web application. Here are a few suggestions:
By implementing some or all of these strategies, one can significantly improve the page load time of your website or web application.
This is one of the frequently asked senior Front-end developer interview questions.
Dependency injection (DI) is a design pattern that allows an object to receive its dependencies from an external source rather than creating them itself. This can make it easier to design, test, and maintain complex systems, as it allows different components of the system to be isolated from one another and more easily modified or replaced.
In a DI system, objects are typically defined with interfaces that specify their dependencies. An external source, such as a container or factory, is responsible for creating and injecting the required dependencies into the object when it is needed. This means that the object does not need to know how to create its dependencies, or even what they are.
For example, consider a simple object that represents a car. The car object might have a dependency on an engine object, which it needs in order to operate. Without DI, the car object might create its own engine object using the new operator, like this:
class Car {
constructor() {
this.engine = new Engine();
}
} With DI, the car object would instead define an interface for its engine dependency, and the DI container would be responsible for creating and injecting the engine object when the car object is created:
class Car {
constructor(engine) {
this.engine = engine;
}
} Using DI has several benefits:
Overall, dependency injection is a useful design pattern that can help to improve the modularity, testability, and maintainability of complex systems.
Lazy loading is a technique that allows content to be loaded on demand, rather than all at once. This can help to improve the performance and load time of a webpage or web application, especially if it has a lot of content.
Lazy loading can be implemented in various ways, such as: