MERN Introduction
MERN is a stack of four JavaScript tools for building full-stack web apps. This course uses MongoDB 8.2.6, Express 5.3.0, React 19.3.1, and Node.js v24.22.1.
The four parts
This array lists the four parts of the stack.
const stack = ['MongoDB', 'Express', 'React', 'Node.js'];
console.log(stack.join(' + '));One language
JavaScript runs on every part of the stack.
console.log('JavaScript runs the whole stack.');Example
const stack = ['MongoDB', 'Express', 'React', 'Node.js'];
for (const part of stack) {
console.log(part);
}Key points
- MERN stands for MongoDB, Express, React, and Node.js.
- MongoDB stores the data for the app.
- Express runs the server code that answers requests.
- React builds the pages that run in the browser.
- Node.js runs JavaScript on the server, not in a browser.
In this example, stack is an array of four strings. Each string names one part of MERN. The loop prints each part on its own line. The output lists MongoDB, Express, React, and Node.js in order.
Note
The version numbers in this course match the versions used to test every example.
Try it Yourself
Edit the code, then press Run.
Running is simulated
Exercise
What does MERN stand for?