Verifying Node.js Installation
After installing Node.js, you can verify the installation using the terminal (Command Prompt, PowerShell, Terminal, or Bash):
Step 1: Check Node.js version
node -v
If installed correctly, it will return the version number, e.g.:
v20.11.1
Step 2: Check npm version
npm -v
You should see a version like:
10.2.4
Step 3: Run a simple Node.js script
Create a file named test.js with the following content:
console.log('Node.js is working!');
Run it using:
node test.js
You should see:
Node.js is working!


