JS JavaScript

JavaScript: Running Code & Tools

Node.js

Install Node.js from nodejs.org. Then:

node my_file.js              # run a script
node -e "console.log(1+1)"   # run inline

Browser console

Press F12 (or Cmd+Option+J) and click the Console tab. You can type JS directly and experiment live.

Editors

  • VS Code — install ESLint and Prettier extensions
  • WebStorm — full JetBrains IDE for JS
  • Vim/Neovim — lightweight, good JS LSP support

npm (Node Package Manager)

npm init -y                # create package.json
npm install express        # save as dependency
npx create-react-app my-app # run a package without installing globally

Quick check below!