Open a terminal window.
Type:
node -v
This will display your nodejs version.
Navigate to where you saved your script and input:
node script.js
This will run your script.
Open a terminal window.
Type:
node -v
This will display your nodejs version.
Navigate to where you saved your script and input:
node script.js
This will run your script.