hello.js
js1 kB17 linesIn Examples.zip
Examples.zipChapter02-Fundamentalshello.js
// hello.js - Your first Node.js program
// Run: node hello.js
console.log("Hello from Node.js!");
const message = "Node runs JavaScript outside the browser";
console.log(message);
// Node can access system information
console.log("Platform:", process.platform);
console.log("Node Version:", process.version);
console.log("Current Directory:", process.cwd());
// Simple calculation
const sum = 10 + 20;
console.log("10 + 20 =", sum);