About Lesson
Step 1: Download Node.js
- Visit the official website: https://nodejs.org/
- Choose LTS (Long-Term Support) version for stability.
Step 2: Verify Installation
After installation, open Command Prompt (Windows) or Terminal (Mac/Linux) and run:
node -v # Check Node.js version
npm -v # Check NPM version
Running JavaScript in Node.js
- Create a new file app.js
- Add the following code:
console.log(“Welcome to Node.js!”);
- Run the file using:
node app.js
Output: Welcome to Node.js!