To run JavaScript without a browser, install Node.js from nodejs.org. After installation, open your terminal and type node --version to confirm it works.
Create a file called app.js with some JavaScript:
console.log("Running in Node.js")
Run it by typing node app.js in your terminal. The output appears directly in the terminal. You'll use Node.js later for server-side programming and running build tools.