Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • Software and Tools
    • School Learning
    • Practice Coding Problems
  • Go Premium
  • NodeJS Tutorial
  • NodeJS Exercises
  • NodeJS Assert
  • NodeJS Buffer
  • NodeJS Console
  • NodeJS Crypto
  • NodeJS DNS
  • NodeJS File System
  • NodeJS Globals
  • NodeJS HTTP
  • NodeJS HTTP2
  • NodeJS OS
  • NodeJS Path
  • NodeJS Process
  • NodeJS Query String
  • NodeJS Stream
  • NodeJS String Decoder
  • NodeJS Timers
  • NodeJS URL
  • NodeJS Interview Questions
  • NodeJS Questions
  • Web Technology
Open In App
Next Article:
Node Interview Questions and Answers (2025) - Advanced Level
Next article icon

Node Interview Questions and Answers (2025) - Intermediate Level

Last Updated : 06 Mar, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

NodeJS is an open-source, cross-platform runtime environment that allows you to execute JavaScript code on the server side. Built on Chrome’s V8 JavaScript engine, NodeJS is designed for building scalable, high-performance applications, especially with its event-driven, non-blocking (asynchronous) I/O model. It enables developers to use JavaScript for both client-side and server-side scripting, making it a powerful tool for full-stack development.

In this article, we will explore NodeJS interview questions and answers – Intermediate Level 2025, covering the key concepts and topics that are commonly asked in interviews for candidates with 1-2 years of experience. Whether you’re preparing for an upcoming interview or looking to deepen your understanding of NodeJS, this guide will provide insights into the core concepts and practical applications of NodeJS.

Prerequisite

  • NodeJS Interview Questions and Answers (2025) – Beginner Level
  • NodeJS Interview Questions and Answers (2025) – Advanced Level

Node Intermediate Interview Questions – 2025

This set contains the intermediate-level questions asked in the interview.

1. What is event-driven programming in NodeJS?

Event-driven programming is used to synchronize the occurrence of multiple events and to make the program as simple as possible. The basic components of an Event-Driven Program are:

  • A callback function ( called an event handler) is called when an event is triggered.
  • An event loop that listens for event triggers and calls the corresponding event handler for that event.

2. What is a buffer in NodeJS?

The Buffer class in NodeJS is used to perform operations on raw binary data. Generally, a buffer refers to a particular location in memory. Buffer and array have some similarities, but the difference is that array can be any type, and it can be resizable. Buffers only deal with binary data, and they can not be resized. Each integer in a buffer represents a byte. console.log() function is used to print the Buffer instance.

3. What are streams in NodeJS?

Streams are a type of data-handling method used to read or write input into output sequentially. Streams are used to handle reading/writing files or exchanging information in an efficient way. The stream module provides an API for implementing the stream interface. Examples of the stream object in NodeJS can be a request to an HTTP server and process.stdout are both stream instances.

4. Explain crypto module in NodeJS

The crypto module is used for encrypting, decrypting, or hashing any type of data. This encryption and decryption basically help to secure and add a layer of authentication to the data. The main use case of the crypto module is to convert the plain readable text to an encrypted format and decrypt it when required.

5. What is callback hell?

Callback hell is an issue caused due to a nested callback. This causes the code to look like a pyramid and makes it unable to read To overcome this situation we use promises.

6. Explain the use of timers module in NodeJS

The Timers module in NodeJS contains various functions that allow us to execute a block of code or a function after a set period of time. The Timers module is global, we do not need to use require() to import it. 

It has the following methods:

  • setTimeout() method
  • setImmediate() method
  • setInterval() method

7. Difference between setImmediate() and process.nextTick() methods

Feature

setImmediate()

process.nextTick()

Execution Timing

Executes the callback after the current event loop cycle, but before the I/O tasks.

Executes the callback immediately after the current operation, before any I/O or timers.

Priority

Executes after I/O events and before timers.

Executes before any I/O events or timers.

Stack Overflow Risk

Less likely to cause a stack overflow because it is queued after the current event loop phase.

Can cause a stack overflow if used excessively because it executes before I/O or other operations, potentially blocking the event loop.

Use Case

Used when you want to execute a callback after the event loop is done processing the current phase but before the next one starts.

Used to schedule a callback to be executed before any I/O events or timers in the current phase.

Example

setImmediate(() => { console.log('Immediate'); });

process.nextTick(() => { console.log('Next Tick'); });

8. What are the pros and cons of NodeJS?

Pros of NodeJS

Pros

Explanation

Non-blocking, Asynchronous I/O

NodeJS handles multiple requests simultaneously without waiting for one to finish, making it ideal for I/O-heavy applications like APIs, real-time apps, etc.

High Performance (V8 Engine)

Built on Chrome's V8 JavaScript engine, NodeJS compiles JavaScript directly into machine code, leading to faster execution, especially for I/O-bound tasks.

Active Community

NodeJS has a large, active, and supportive community, making it easier to find solutions to problems and stay updated with the latest advancements.

Cons of NodeJS

Cons

Explanation

Single-Threaded Nature

While the single-threaded model is a benefit for I/O-bound tasks, it limits NodeJS for certain types of applications, especially those requiring heavy computation.

Callback Hell

Asynchronous programming can lead to deeply nested callbacks, which can result in "callback hell" or difficult-to-manage code if not handled properly (e.g., with Promises).

Debugging Difficulties

Debugging asynchronous code in NodeJS can be tricky due to its non-blocking nature. Stack traces can be harder to follow in a callback-heavy codebase.

9. What is the difference between process.nextTick() and setImmediate() method?

Feature

process.nextTick()

setImmediate()

Execution Timing

Executes the callback immediately after the current operation, before any I/O or timers.

Executes the callback after the current event loop cycle, after I/O events but before timers.

Priority

Has a higher priority than I/O events and timers, making it execute first.

Executes after I/O events but before timers, giving it lower priority than process.nextTick().

Blocking Potential

Can cause a stack overflow if used excessively, as it keeps the event loop busy without yielding.

Less likely to block the event loop, as it schedules the callback in the next iteration.

Use Case

Used for handling situations where you need to execute a callback immediately, before any further I/O events.

Used when you want to schedule a callback for the next iteration of the event loop, after I/O tasks.

Example Command

process.nextTick(() => { console.log('Next Tick'); });

setImmediate(() => { console.log('Immediate'); });

10. Explain the use of passport module in NodeJS

The passport module is used for adding authentication features to our website or web app. It implements authentication measure which helps to perform sign-in operations.

11. What is fork in NodeJS?

Fork is a method in NodeJS that is used to create child processes. It helps to handle the increasing workload. It creates a new instance of the engine which enables multiple processes to run the code.

12. What are the three methods to avoid callback hell?

The three methods to avoid callback hell are:

  • Using async/await()
  • Using promises
  • Using generators

13. What is body-parser in NodeJS?

Body-parser is the NodeJS body-parsing middleware. It is responsible for parsing the incoming request bodies in a middleware before you handle it. It is an NPM module that processes data sent in HTTP requests.

14. What is CORS in NodeJS?

The word CORS stands for “Cross-Origin Resource Sharing”. Cross-Origin Resource Sharing is an HTTP-header based mechanism implemented by the browser which allows a server or an API to indicate any origins (different in terms of protocol, hostname, or port) other than its origin from which the unknown origin gets permission to access and load resources. The cors package available in the npm registry is used to tackle CORS errors in a NodeJS application.

15. Explain the TLS module in NodeJS?

The TLS module provides an implementation of the Transport Layer Security (TLS) and Secure Socket Layer (SSL) protocols that are built on top of OpenSSL. It helps to establish a secure connection on the network.

16. What is the use of url module in NodeJS?

In NodeJS url module is used to split the URL of the website into parts so that it becomes readable and can be used in the different parts of the application. The parse() method is used with the url module to separate the URL of the website into parts.

17. What is REST API?

REST API stands for REpresentational State Transfer API. It is a type of API (Application Programming Interface) that allows communication between different systems over the internet. REST APIs work by sending requests and receiving responses, typically in JSON format, between the client and server.

REST APIs use HTTP methods (such as GET, POST, PUT, DELETE) to define actions that can be performed on resources. These methods align with CRUD (Create, Read, Update, Delete) operations, which are used to manipulate resources over the web.

18. Explain the engine Google uses for NodeJS

The engine used by Google for NodeJS is V8. It is one the fastest engine as it is written in C++. It provides a runtime environment for the execution of JavaScript code. The best part is that the JavaScript engine is completely independent of the browser in which it runs. It has a huge community and is highly portable.

19. Name the tool used for writing consistent code

ESLint is a tool used in many IDEs to write consistent code styles. ESLint is written using NodeJS to provide a fast runtime environment and easy installation via npm.

20. What are the different kinds of HTTP requests?

The most commonly used HTTP requests are:

  • GET: This request is used to read/retrieve data from a web server. GET returns an HTTP status code of 200 (OK) if the data is successfully retrieved from the server.
  • PUT: This request is used to modify the data on the server. It replaces the entire content at a particular location with data that is passed in the body payload. If there are no resources that match the request, it will generate one.
  • POST: This request is used to send data (file, form data, etc.) to the server. On successful creation, it returns an HTTP status code of 201.
  • DELETE: This request is used to delete the data on the server at a specified location.

21. What are streams in NodeJS?

In NodeJS, streams are a powerful way to handle data in chunks rather than loading the entire data into memory. Streams allow for the efficient processing of large volumes of data, especially in situations where the data size is too large to fit into memory all at once.

There are the four types of the Streams:

  • Readable Streams: These streams allow you to read data. For example, reading data from a file or receiving HTTP request data. Example:
fs.createReadStream() or http.IncomingMessage.
  • Writable Streams: These streams allow you to write data. For example, writing data to a file or sending HTTP response data. Example:
 fs.createWriteStream() or http.ServerResponse.
  • Duplex Streams: These are both readable and writable. You can both read and write data using the same stream. Example: A TCP socket.
  • Transform Streams: These are a type of duplex stream where the data is transformed as it is read and written. Example: A zlib stream to compress or decompress data.

22.  What is event-driven programming in NodeJS?

Event-driven programming is used to synchronize the occurrence of multiple events and to make the program as simple as possible. The basic components of an Event-Driven Program are:

  • A callback function ( called an event handler) is called when an event is triggered.
  • An event loop that listens for event triggers and calls the corresponding event handler for that event.

23. What is the most commonly used libraries in NodeJS?

There are the two most commonly used libraries in NodeJs:

  • ExpressJS: ExpressJS is a minimal and flexible web application framework for building robust APIs and web apps. It simplifies routing, middleware handling, and request/response management.
  • Mongoose: An Object Data Modeling (ODM) library for MongoDB and NodeJS, it helps in managing data relationships, schema validation, and business logic.

24. Why is NodeJS preferred over other backend technologies like Java and PHP?

NodeJS is preferred over other backend technologies like Java and PHP for several reasons, especially when building modern, scalable, and high-performance applications. Here's why NodeJS stands out:

  • Non-Blocking, Asynchronous I/O
  • Single Programming Language (JavaScript)
  • High Performance (V8 Engine)
  • Real-Time Applications

25. What is package.json in NodeJS?

package.json in NodeJS is a metadata file that contains project-specific information such as dependencies, scripts, version, author details, and other configuration settings required for managing and building the project.

{
"name": "app",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"dependencies": {
"express": "^4.21.2"
}
}

26. How do we create simple ExpressJS application in NodeJS?

Step 1: Install NodeJS

Ensure that you have NodeJS installed on your machine. You can download it from nodejs.org.

Step 2: Create a New Directory

Open a terminal/command prompt and create a new directory for your project:

mkdir express-app
cd express-app

Step 3: Initialize a NodeJS Project

Run npm init to initialize a new NodeJS project. This will create a package.json file:

npm init -y

The -y flag automatically answers "yes" to all prompts.

Step 4: Install Express.js

npm install express 

This will add Express to your node_modules folder and save it as a dependency in package.json.

Create the Main Application File (app.js or index.js)

In the root of your project folder, create a new file named app.js or index.js:

touch app.js

Step 5: Write Your Express Application Code

Open app.js and write the following code to set up a basic Express server:

JavaScript
// Load the Express module
const express = require('express');

const app = express();
app.get('/', (req, res) => {
    res.send('Hello, Express!');
});
const PORT = 3000;
app.listen(PORT, () => {
    console.log(`Server is running on http://localhost:${PORT}`);
});

Run the application by using the command:

node app.js

Open your browser and visit http://localhost:3000. You should see the message: "Hello, Express!".

27. Explain asynchronous and non-blocking APIs in NodeJS.

  • Asynchronous APIs: They allow NodeJS to start an operation (e.g., reading a file or making a database request) and move on to the next task without waiting for the operation to finish. Once the task completes, a callback function is executed to handle the result.
  • Non-blocking: It refers to the behavior where an API does not block the execution of subsequent code while waiting for an I/O operation to finish. Instead, NodeJS uses the event loop to continue processing other operations.

28. How to create the simple HTTP server in NodeJS?

You can create a simple HTTP server in NodeJS using the built-in http module:

JavaScript
const http = require('http');

const server = http.createServer((req, res) => {
  res.writeHead(200, { 'Content-Type': 'text/plain' });
  res.end('Hello, World!');
});
server.listen(3000, () => {
  console.log('Server is running at http://localhost:3000/');
});

Output:

node app.js
Screenshot-2025-03-05-151651
NodeJS

29.What is a callback function in NodeJS?

A callback is a function which is called after a given task. In NodeJS callback functions prevents any blocking and enables other code to run in the meantime.

30. What are the two types of API functions in NodeJS?

The two types of API functions in NodeJS are:

  • Asynchronous: It is the non-blocking functions NodeJS.
  • Synchronous: It is the blocking functions in NodeJS.

Next Article
Node Interview Questions and Answers (2025) - Advanced Level

S

shobhit_sharma
Improve
Article Tags :
  • Web Technologies
  • Node.js
  • interview-preparation
  • NodeJS-Questions
  • Interview-Questions

Similar Reads

    HTML Interview Questions

    HTML Interview Questions and Answers
    HTML (HyperText Markup Language) is the foundational language for creating web pages and web applications. Whether you're a fresher or an experienced professional, preparing for an HTML interview requires a solid understanding of both basic and advanced concepts. Below is a curated list of 50+ HTML
    14 min read
    HTML Interview Questions and Answers (2024) - Intermediate Level
    In this article, you will learn HTML interview questions and answers intermediate level that are most frequently asked in interviews. Before proceeding to learn HTML interview questions and answers - intermediate level, first we learn the complete HTML Tutorial, and HTML Interview Questions and Answ
    13 min read
    HTML Interview Questions and Answers (2024) – Advanced Level
    In this advanced HTML Interview Questions, we cover the most frequently asked interview questions of HTML. Here, you'll find detailed questions related to advanced HTML topics and in-depth explanations to help you succeed.If you're just starting out or are at an intermediate level, we have dedicated
    13 min read

    CSS Interview Questions

    CSS Interview Questions and Answers
    CSS (Cascading Style Sheets) is the language that styles and organizes web pages. It makes websites visually appealing and user-friendly. Mastering CSS is crucial whether you're a beginner or a seasoned developer. This guide presents 60+ CSS interview questions and answers, categorized to help you p
    15+ min read

    JavaScript Interview Questions

    JavaScript Interview Questions and Answers
    JavaScript is the most used programming language for developing websites, web servers, mobile applications, and many other platforms. In Both Front-end and Back-end Interviews, JavaScript was asked, and its difficulty depends upon the on your profile and company. Here, we compiled 70+ JS Interview q
    15+ min read
    JavaScript Interview Questions and Answers (2025) - Intermediate Level
    In this article, you will learn JavaScript interview questions and answers intermediate level that are most frequently asked in interviews. Before proceeding to learn JavaScript interview questions and answers – intermediate level, first we learn the complete JavaScript Tutorial, and JavaScript Inte
    6 min read
    JavaScript Interview Questions and Answers (2025) - Advanced Level
    In this article, you will learn JavaScript interview questions and answers Advanced level that are most frequently asked in interviews. Before proceeding to learn JavaScript interview questions and answers – advanced level, first we will learn the complete JavaScript Tutorial. PrerequisitesJavaScrip
    6 min read

    TypeScript Interview Questions

    TypeScript Interview Questions and Answers
    TypeScript, a robust, statically typed superset of JavaScript, has become a go-to language for building scalable and maintainable applications. Developed by Microsoft, it enhances JavaScript by adding static typing and modern ECMAScript features, enabling developers to catch errors early and improve
    15+ min read

    jQuery Interview Questions

    Top 50+ jQuery Interview Questions and Answers - 2025
    jQuery, a fast and lightweight JavaScript library, has been a game-changer in simplifying front-end web development known for its simplicity, ease of use, and cross-browser compatibility. In this article, we will provide the Top 50+ jQuery Interview Questions 2025 tailored for both freshers and expe
    15+ min read
    jQuery Interview Questions and Answers | Set-2
    We have already discussed some questions in jQuery Interview Questions and Answers | Set-1 Below are some more related questions: What are the basic selectors in jQuery ? Following are the basic selectors in jQuery: Element IDCSS NameTag NameDOM hierarchyWhat are the categories in jQuery Events ?For
    4 min read
    jQuery Interview Questions and Answers | Set-3
    We have already discussed some jQuery interview questions. jQuery Interview Questions and Answers | Set-1jQuery Interview Questions and Answers | Set-2 Below are some more related questions: What is method chaining in jQuery ? What advantages does it offer ? Method chaining is a feature of jQuery th
    5 min read

    Angular Interview Questions

    Angular Interview Questions and Answers
    Angular is a popular framework for building dynamic web applications. Developed and maintained by Google, Angular allows developers to create fast, efficient, and scalable single-page applications (SPAs) that provide a seamless user experience. Google, Accenture, Microsoft, PayPal, Upwork, Netflix,
    15+ min read

    React Interview Questions

    React Interview Questions and Answers
    React is an efficient, flexible, and open-source JavaScript library that allows developers to create simple, fast, and scalable web applications. Jordan Walke, a software engineer who was working for Facebook, created React. Developers with a JavaScript background can easily develop web applications
    15+ min read
    React Interview Questions and Answers (2025) - Intermediate Level
    ReactJS is an open-source JavaScript library that is used for building user interfaces in a declarative and efficient way. It is a component-based front-end library responsible only for the view layer of an MVC (Model View Controller) architecture. React is used to create modular user interfaces and
    15+ min read
    React Interview Question and Answers (2025) - Advanced Level
    ReactJS is a popular open-source JavaScript library for building fast and interactive user interfaces. It follows a component-based architecture, creating reusable UI components that efficiently update and render dynamic data more easily. React focuses solely on the view layer of an application and
    14 min read

    Node Interview Questions

    NodeJS Interview Questions and Answers
    NodeJS is one of the most popular runtime environments, known for its efficiency, scalability, and ability to handle asynchronous operations. It is built on Chrome’s V8 JavaScript engine for executing JavaScript code outside of a browser. It is extensively used by top companies such as LinkedIn, Net
    15+ min read
    Node Interview Questions and Answers (2025) - Intermediate Level
    NodeJS is an open-source, cross-platform runtime environment that allows you to execute JavaScript code on the server side. Built on Chrome’s V8 JavaScript engine, NodeJS is designed for building scalable, high-performance applications, especially with its event-driven, non-blocking (asynchronous) I
    12 min read
    Node Interview Questions and Answers (2025) - Advanced Level
    NodeJS is an open-source and cross-platform runtime environment built on Chrome’s V8 JavaScript engine for executing JavaScript code outside of a browser. You need to recollect that NodeJS isn’t a framework, and it’s not a programming language. It provides an event-driven, non-blocking (asynchronous
    13 min read

    MERN Interview Questions

    MERN Stack Interview Questions
    MERN Stack is one of the most well-known stacks used in web development. Each of these technologies is essential to the development of web applications, and together they form an end-to-end framework that developers can work within. MERN Stack comprises 4 technologies namely: MongoDB, Express, React
    15+ min read

    PHP Interview Questions

    Top 60+ PHP Interview Questions and Answers -2025
    PHP is a popular server-side scripting language, widely known for its efficiency in web development and versatility across various platforms. PHP is extensively utilized by top companies such as Facebook, WordPress, Slack, Wikipedia, MailChimp, and many more due to its robust features and high perfo
    15+ min read
    PHP Interview Questions and Answers (2024) | Set-2
    In this article, you will learn PHP Interview Questions and Answers that are most frequently asked in interviews. Before proceeding to learn PHP Interview Questions and Answers Set 2, first we learn the complete PHP Tutorial and PHP Interview Questions and Answers. PHP Interview Questions and Answer
    8 min read
`; $(commentSectionTemplate).insertBefore(".article--recommended"); } loadComments(); }); }); function loadComments() { if ($("iframe[id*='discuss-iframe']").length top_of_element && top_of_screen articleRecommendedTop && top_of_screen articleRecommendedBottom)) { if (!isfollowingApiCall) { isfollowingApiCall = true; setTimeout(function(){ if (loginData && loginData.isLoggedIn) { if (loginData.userName !== $('#followAuthor').val()) { is_following(); } else { $('.profileCard-profile-picture').css('background-color', '#E7E7E7'); } } else { $('.follow-btn').removeClass('hideIt'); } }, 3000); } } }); } $(".accordion-header").click(function() { var arrowIcon = $(this).find('.bottom-arrow-icon'); arrowIcon.toggleClass('rotate180'); }); }); window.isReportArticle = false; function report_article(){ if (!loginData || !loginData.isLoggedIn) { const loginModalButton = $('.login-modal-btn') if (loginModalButton.length) { loginModalButton.click(); } return; } if(!window.isReportArticle){ //to add loader $('.report-loader').addClass('spinner'); jQuery('#report_modal_content').load(gfgSiteUrl+'wp-content/themes/iconic-one/report-modal.php', { PRACTICE_API_URL: practiceAPIURL, PRACTICE_URL:practiceURL },function(responseTxt, statusTxt, xhr){ if(statusTxt == "error"){ alert("Error: " + xhr.status + ": " + xhr.statusText); } }); }else{ window.scrollTo({ top: 0, behavior: 'smooth' }); $("#report_modal_content").show(); } } function closeShareModal() { const shareOption = document.querySelector('[data-gfg-action="share-article"]'); shareOption.classList.remove("hover_share_menu"); let shareModal = document.querySelector(".hover__share-modal-container"); shareModal && shareModal.remove(); } function openShareModal() { closeShareModal(); // Remove existing modal if any let shareModal = document.querySelector(".three_dot_dropdown_share"); shareModal.appendChild(Object.assign(document.createElement("div"), { className: "hover__share-modal-container" })); document.querySelector(".hover__share-modal-container").append( Object.assign(document.createElement('div'), { className: "share__modal" }), ); document.querySelector(".share__modal").append(Object.assign(document.createElement('h1'), { className: "share__modal-heading" }, { textContent: "Share to" })); const socialOptions = ["LinkedIn", "WhatsApp","Twitter", "Copy Link"]; socialOptions.forEach((socialOption) => { const socialContainer = Object.assign(document.createElement('div'), { className: "social__container" }); const icon = Object.assign(document.createElement("div"), { className: `share__icon share__${socialOption.split(" ").join("")}-icon` }); const socialText = Object.assign(document.createElement("span"), { className: "share__option-text" }, { textContent: `${socialOption}` }); const shareLink = (socialOption === "Copy Link") ? Object.assign(document.createElement('div'), { role: "button", className: "link-container CopyLink" }) : Object.assign(document.createElement('a'), { className: "link-container" }); if (socialOption === "LinkedIn") { shareLink.setAttribute('href', `https://www.linkedin.com/sharing/share-offsite/?url=${window.location.href}`); shareLink.setAttribute('target', '_blank'); } if (socialOption === "WhatsApp") { shareLink.setAttribute('href', `https://api.whatsapp.com/send?text=${window.location.href}`); shareLink.setAttribute('target', "_blank"); } if (socialOption === "Twitter") { shareLink.setAttribute('href', `https://twitter.com/intent/tweet?url=${window.location.href}`); shareLink.setAttribute('target', "_blank"); } shareLink.append(icon, socialText); socialContainer.append(shareLink); document.querySelector(".share__modal").appendChild(socialContainer); //adding copy url functionality if(socialOption === "Copy Link") { shareLink.addEventListener("click", function() { var tempInput = document.createElement("input"); tempInput.value = window.location.href; document.body.appendChild(tempInput); tempInput.select(); tempInput.setSelectionRange(0, 99999); // For mobile devices document.execCommand('copy'); document.body.removeChild(tempInput); this.querySelector(".share__option-text").textContent = "Copied" }) } }); // document.querySelector(".hover__share-modal-container").addEventListener("mouseover", () => document.querySelector('[data-gfg-action="share-article"]').classList.add("hover_share_menu")); } function toggleLikeElementVisibility(selector, show) { document.querySelector(`.${selector}`).style.display = show ? "block" : "none"; } function closeKebabMenu(){ document.getElementById("myDropdown").classList.toggle("show"); }
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences