Mern Full Stack Developer
100+ Mern Full Stack Developer Interview Questions and Answers
Q51. Write CRUD APIs for a sample data
Creating CRUD APIs for sample data in a MERN stack application
Create a POST API to add new data
Create a GET API to retrieve all data
Create a GET API to retrieve data by ID
Create a PUT API to update data by ID
Create a DELETE API to delete data by ID
Q52. Check if 2 strings are anagrams.
Check if 2 strings are anagrams.
Convert both strings to lowercase
Remove all non-alphabetic characters
Sort the characters in both strings
Compare the sorted strings, if they are equal, they are anagrams
Q53. What is foriegn Key SQL?
Foreign key in SQL is a field in a table that is a primary key in another table, establishing a relationship between the two tables.
A foreign key constraint ensures referential integrity between two related tables.
It helps maintain consistency and avoid orphan records.
Example: In a database with tables 'orders' and 'customers', the 'customer_id' in 'orders' table can be a foreign key referencing the 'id' column in 'customers' table.
Q54. What is lookup in mongodb?
Lookup in MongoDB is used to perform a left outer join to retrieve documents from another collection.
Lookup is used to combine data from two collections based on a common field.
It is similar to a SQL join operation.
Lookup is used in aggregation pipelines to fetch related documents from another collection.
Example: db.collection.aggregate([{ $lookup: { from: 'anotherCollection', localField: 'field', foreignField: 'field', as: 'alias' } }])
Q55. redis usage in the nodejs + express
Redis is used in Node.js + Express for caching, session management, and real-time data processing.
Redis can be used for caching frequently accessed data to improve performance.
It can also be used for session management to store user session data.
Redis is commonly used for real-time data processing in applications like chat rooms or live updates.
Example: Storing user sessions in Redis to maintain login state across multiple servers.
Q56. Difference between react and next js
React is a JavaScript library for building user interfaces, while Next.js is a framework built on top of React for server-side rendering and static site generation.
React is a JavaScript library for building user interfaces, while Next.js is a framework built on top of React.
Next.js provides features like server-side rendering, static site generation, and routing out of the box, while React does not.
Next.js simplifies the process of building React applications by providing a m...read more
Share interview questions and help millions of jobseekers 🌟
Q57. How node handles concurrency
Node.js uses an event-driven, non-blocking I/O model to handle concurrency.
Node.js uses an event loop to handle multiple requests concurrently.
It employs a single-threaded event loop that can handle thousands of concurrent connections.
Node.js uses non-blocking I/O operations, allowing it to efficiently handle multiple requests without blocking the execution of other code.
It utilizes callbacks and promises to handle asynchronous operations.
Node.js also provides the cluster mod...read more
Q58. Difference between slice and splice
Slice is a method that returns a shallow copy of a portion of an array into a new array, while splice is a method that changes the contents of an array by removing or replacing existing elements.
Slice does not modify the original array, while splice does.
Slice takes two arguments - start and end index, while splice takes three arguments - start index, number of elements to remove, and optional elements to add.
Example: const arr = [1, 2, 3, 4, 5]; arr.slice(1, 3) returns [2, 3...read more
Mern Full Stack Developer Jobs
Q59. What is event loop?
Event loop is a mechanism in JavaScript that allows for asynchronous operations to be executed in a non-blocking way.
Event loop is responsible for handling asynchronous operations in JavaScript.
It allows for non-blocking execution of code by continuously checking the call stack and the callback queue.
Event loop processes tasks in a queue and executes them one by one.
Example: setTimeout() function in JavaScript uses event loop to schedule the execution of a function after a sp...read more
Q60. Why Oracle Cerner etc....
Oracle and Cerner are popular choices for healthcare organizations due to their robust features, scalability, and industry-specific functionalities.
Oracle offers a comprehensive suite of healthcare solutions, including electronic health records (EHR) and population health management.
Cerner is known for its interoperability capabilities, allowing seamless data exchange between different healthcare systems.
Both Oracle and Cerner have a strong presence in the healthcare industry...read more
Q61. for loop in js with var let an dconst
The for loop in JavaScript can be used with var, let, and const to iterate over arrays or objects.
The 'var' keyword declares a variable globally or locally to an entire function regardless of block scope.
The 'let' keyword declares a block-scoped variable that can be reassigned within the block it was declared.
The 'const' keyword declares a block-scoped variable that cannot be reassigned or redeclared.
Q62. Explain the functional programming
Functional programming is a programming paradigm that emphasizes on the use of functions to solve problems.
Functions are treated as first-class citizens
Pure functions are preferred over impure functions
Avoidance of side effects
Immutability is preferred over mutability
Declarative programming style
Examples: Haskell, Lisp, Clojure
Q63. How does javascript work
JavaScript is a scripting language that allows for dynamic content on websites by manipulating HTML and CSS.
JavaScript is a client-side scripting language that runs in the browser
It can be used to manipulate HTML elements, handle events, and interact with the browser
JavaScript code is executed line by line and can be embedded directly into HTML or linked as an external file
Q64. What is html,5 features
HTML5 is the latest version of the HTML standard, introducing new features for web development.
Introduction of new semantic elements like <header>, <footer>, <nav>, <article>, <section>, <aside>
Support for audio and video elements without the need for plugins
Canvas element for drawing graphics on the fly
Local storage capabilities for storing data on the client side
Improved form elements like date pickers, email validation, and placeholder text
Q65. Tell me about JSX
JSX is a syntax extension for JavaScript used with React to describe what the UI should look like.
JSX stands for JavaScript XML
It allows developers to write HTML-like code in JavaScript
JSX elements are transpiled into regular JavaScript function calls
Q66. What is hooks in react
Hooks in React are functions that let you use state and other React features without writing a class.
Hooks were introduced in React 16.8 to allow functional components to have state and lifecycle methods.
useState() is a hook that allows you to add state to functional components.
useEffect() is a hook that allows you to perform side effects in functional components.
Custom hooks are reusable functions that contain logic and can be shared across multiple components.
Q67. What is state management
State management is the process of managing and updating the state of an application in a predictable and efficient manner.
State management involves storing and updating the state of an application in a centralized location.
It helps in maintaining the consistency of data across different components of an application.
State management libraries like Redux or Context API in React help in managing state effectively.
State management is crucial for building complex applications wit...read more
Q68. What is react What is state Useffect
React is a JavaScript library for building user interfaces. State is a JavaScript object that stores data in a component. useEffect is a React hook for handling side effects.
React is a library for building UI components
State is a JavaScript object that stores data within a component
useEffect is a hook used for handling side effects in React components
Q69. What's is redux
Redux is a predictable state container for JavaScript apps.
Redux is a state management tool commonly used with React.
It helps manage the state of an application in a predictable way.
Redux stores the entire state of an application in a single immutable object.
Q70. What is aggregation
Aggregation is the process of combining data from multiple sources to provide a summary or overview.
Aggregation in databases involves grouping and summarizing data to provide insights.
In MongoDB, aggregation pipelines are used to process data and return computed results.
Examples of aggregation functions include sum, average, count, and group by.
Q71. What about SDLC?
SDLC stands for Software Development Life Cycle, a process used by software developers to design, develop, and test software.
SDLC is a structured process that consists of several phases such as planning, analysis, design, implementation, testing, and maintenance.
Each phase in SDLC has its own set of activities and deliverables to ensure the successful development of software.
SDLC helps in improving the quality of software, reducing development time and cost, and ensuring that...read more
Q72. useffect using with addeventlistener
addEventListener is used to attach an event handler to an element.
addEventListener is a method used to listen for a specified event on an element.
The 'useCapture' parameter determines the order in which event handlers are called.
Example: element.addEventListener('click', myFunction);
Q73. write a basic function component
A basic function component in React
Create a function component using the 'function' keyword
Return JSX elements within the component function
Example: const MyComponent = () => { return
Hello World!; }
Q74. What is virtual DOM?
Virtual DOM is a lightweight copy of the actual DOM that allows for efficient updates and rendering in web applications.
Virtual DOM is a concept used in frameworks like React to improve performance by minimizing direct manipulation of the actual DOM.
When changes are made to the virtual DOM, a comparison is done with the actual DOM to identify the minimal number of updates needed.
This approach reduces the number of DOM manipulations, leading to faster rendering and improved us...read more
Q75. What is callback functions
Callback functions are functions passed as arguments to other functions to be executed later.
Callback functions are commonly used in asynchronous programming.
They allow for functions to be executed after another function has finished.
Examples include event listeners in web development.
Q76. How to solve cors issue
To solve CORS issue, configure server to allow cross-origin requests.
Set appropriate headers on server side to allow requests from specific origins
Use middleware like cors in Node.js to handle CORS
Consider using proxy server to bypass CORS restrictions
Q77. event loop how works
The event loop is a mechanism in JavaScript that allows for asynchronous operations to be executed in a non-blocking way.
Event loop is responsible for handling asynchronous operations in JavaScript.
It continuously checks the call stack and the callback queue to see if there are any functions that need to be executed.
If the call stack is empty, the event loop will take a function from the callback queue and push it onto the call stack for execution.
Example: setTimeout() functi...read more
Q78. How browser works
Browsers interpret HTML, CSS, and JavaScript to display web pages to users.
Browsers receive HTML, CSS, and JavaScript files from a web server.
The browser parses the HTML to create the Document Object Model (DOM).
CSS is used to style the DOM elements, while JavaScript adds interactivity.
The browser then renders the final web page for the user to view.
Q79. What is props
Props are read-only properties that are passed from a parent component to a child component in React.
Props allow data to be passed down the component tree.
Props are immutable and cannot be changed by the child component.
Props are accessed in the child component using this.props.
Q80. what is EventLoop?
EventLoop is a mechanism in JavaScript that allows for asynchronous operations to be executed in a non-blocking manner.
EventLoop is responsible for handling asynchronous operations in JavaScript.
It continuously checks the call stack and the task queue, moving tasks from the queue to the stack when the stack is empty.
EventLoop ensures that JavaScript remains single-threaded and non-blocking, allowing for efficient handling of asynchronous tasks.
Q81. make ui clone of given website
Create a UI clone of a given website for a Mern Full Stack Developer position.
Study the layout, design, and functionality of the given website thoroughly.
Use HTML, CSS, and JavaScript to replicate the UI elements and features.
Ensure responsiveness and compatibility with different devices and browsers.
Consider using frameworks like React for efficient development.
Test the clone extensively to ensure it matches the original website.
Q82. var,let const difference
var, let, and const are all used to declare variables in JavaScript, but they have different scopes and mutability.
var has function scope and can be redeclared and reassigned
let has block scope and can be reassigned but not redeclared
const has block scope and cannot be reassigned or redeclared
Q83. event emmiter in nodejs
Event emitter in Node.js is a module that allows objects to emit and listen for events.
Event emitter is a built-in module in Node.js
It allows objects to emit named events that cause Function objects to be called
Example: const EventEmitter = require('events');
Example: const myEmitter = new EventEmitter();
Q84. variables in javascript
Variables in JavaScript are used to store data values.
Variables are declared using the 'var', 'let', or 'const' keywords.
Variables can store different types of data such as numbers, strings, arrays, objects, etc.
Variables can be reassigned with new values.
Variables are case-sensitive.
Example: var x = 5; let name = 'John'; const PI = 3.14;
Q85. Framework used in last project
I used React.js as the framework in my last project.
React.js is a popular JavaScript library for building user interfaces.
It allows for the creation of reusable UI components.
React.js uses a virtual DOM for efficient rendering.
Example: I used React.js to build a dynamic dashboard for tracking sales data.
Q86. what is node js
Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine.
Used for building scalable network applications
Event-driven, non-blocking I/O model
Allows for server-side scripting with JavaScript
NPM (Node Package Manager) for easy installation of packages
Examples: Netflix, LinkedIn, Walmart, PayPal
Q87. what is react js
React JS is a JavaScript library for building user interfaces.
Developed by Facebook
Uses a virtual DOM for efficient rendering
Component-based architecture
Can be used for both web and mobile app development
Supports server-side rendering
Popular in the MERN stack
Q88. Previous project architecture.
The previous project architecture was based on a microservices design pattern with a front-end built using React and a back-end using Node.js and Express.
Microservices architecture was used to break down the application into smaller, independent services that communicate with each other through APIs.
Front-end was developed using React, a popular JavaScript library for building user interfaces.
Back-end was built using Node.js, a runtime environment for executing JavaScript cod...read more
Q89. Work architecture of node js
Node.js follows a single-threaded event-driven architecture, utilizing non-blocking I/O operations.
Node.js uses an event loop to handle asynchronous operations.
It employs the V8 JavaScript engine to execute code.
Node.js modules are organized using CommonJS module system.
It allows for the creation of scalable and high-performance applications.
Q90. Fundamentals of React
React is a JavaScript library for building user interfaces.
React allows developers to create reusable UI components.
It uses a virtual DOM for efficient rendering.
State and props are used to manage data and pass it between components.
Q91. What is a closure
A closure is a function that has access to its own scope, as well as the outer scope in which it was defined.
A closure allows a function to access variables from an outer function even after the outer function has finished executing.
Closures are commonly used in event handlers, callbacks, and for data privacy.
Example: function outerFunction() { let outerVar = 'I am outer'; return function innerFunction() { console.log(outerVar); }; }
Q92. Whats components
Components are reusable and independent units of code that encapsulate functionality and can be combined to build larger applications.
Components are the building blocks of a software application.
They are reusable and can be used multiple times in different parts of the application.
Components can have their own state and can communicate with other components through props.
Examples of components include buttons, forms, navigation bars, and cards.
Q93. Flow of redux store
Flow of redux store involves actions being dispatched, reducers updating the state, and components subscribing to the updated state.
Actions are dispatched by components or middleware
Reducers receive the actions and update the state immutably
Components subscribe to the updated state using mapStateToProps
Q94. create prototype in js
Creating a prototype in JavaScript
Use the Object.create() method to create a prototype object
Add properties and methods to the prototype object
Use the prototype object to create new instances of an object
Q95. Var let const in js?
Var, let, and const are used to declare variables in JavaScript.
Var is function-scoped and can be redeclared and updated.
Let is block-scoped and can be updated but not redeclared.
Const is block-scoped and cannot be updated or redeclared.
Q96. Arrays reverse in js
Use the built-in reverse() method to reverse an array in JavaScript.
Use the reverse() method on the array to reverse its elements in place.
Example: let arr = ['apple', 'banana', 'cherry']; arr.reverse(); // ['cherry', 'banana', 'apple']
Q97. Sql vs non sql db
SQL databases are relational databases that use structured query language, while NoSQL databases are non-relational databases that do not use SQL.
SQL databases are table-based and have a predefined schema, making them suitable for complex queries and transactions.
NoSQL databases are document-based, key-value pairs, graph databases, or wide-column stores, making them more flexible for unstructured data.
Examples of SQL databases include MySQL, PostgreSQL, and Oracle, while exam...read more
Q98. Oops concept in java
Oops concept in Java refers to Object-Oriented Programming principles like Inheritance, Encapsulation, Polymorphism, and Abstraction.
Inheritance allows a class to inherit properties and behavior from another class.
Encapsulation involves bundling data and methods that operate on the data into a single unit.
Polymorphism allows objects to be treated as instances of their parent class.
Abstraction hides the implementation details and only shows the necessary features to the outsid...read more
Q99. Event Loop in jS
Event Loop in JavaScript manages the execution of multiple tasks in a single-threaded environment.
Event Loop is responsible for handling asynchronous operations in JavaScript.
It continuously checks the call stack and the task queue, moving tasks from the queue to the stack when the stack is empty.
Tasks like setTimeout, setInterval, and AJAX requests are handled by the Event Loop.
Event Loop ensures that JavaScript remains non-blocking and responsive.
Q100. Indexing in Node js
Indexing in Node.js is a way to optimize data retrieval by creating indexes on specific fields in a database.
Indexing in Node.js can be done using libraries like Mongoose for MongoDB databases.
Indexes can improve query performance by allowing the database to quickly locate the requested data.
Example: Creating an index on a 'username' field in a user collection can speed up queries searching for a specific user.
Interview Questions of Similar Designations
Top Interview Questions for Mern Full Stack Developer Related Skills
Interview experiences of popular companies
Calculate your in-hand salary
Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary
Reviews
Interviews
Salaries
Users/Month