how to run code with node code example

Example 1: run node js

node name_app.js

Example 2: run node app locally

// Run this command in your terminal to start your node application.
// Replace the tag with your applications main file name (ex index.js, main.js etc). 
// Add alternative a relative or absolute path before the name.

node <filename>.js

Example 3: javascript running at node

const inNode = new Function('try{return this===global;}catch(err){return false;}')();