Node.js: Code Outside the Browser / Introduction to Node.js

hello world script using Node

STEP 1: Create a folder (e.g, node-js)
STEP 2: Open the folder in VS code (or any editor of your choice)

STEP 3: Create a file and name it index.js

STEP 4: Type the following code

console.log(”hello from index.js”);

STEP 4 : In the terminal type node and the filename (with or without the .js extension) and press enter. (Ex: node index.js)