Setup: VS Code, a Browser and Node.js

Install VS Code, Node.js and the Live Preview extension on Windows 11 or macOS, make a folder for the course, and check from VS Code's terminal that Node.js is ready.

Novice · JavaScript · Web Development · Updated

After this lesson you can

  • Name the tools a JavaScript developer uses (VS Code, a browser, Node.js, Live Preview and a terminal) and say what each one is for
  • Check that Node.js is installed by running node --version in VS Code's terminal

Key takeaways

  • VS Code is a code editor, a text editor made for code. Live Preview, an extension for it, shows your web pages in a browser.
  • Node.js runs JavaScript outside the browser. You'll use it to run your programs and your exercises' tests.
  • A terminal is a window where you type commands instead of clicking. VS Code has one built in, opened with Terminal > New Terminal.
  • node --version in VS Code's terminal prints the version of Node.js you have, such as v26.13.0. Any version from 24 on works for this course.

Every JavaScript developer works with the same few tools: an editor to write the code, a browser to see web pages, and Node.js to run programs. Setting them up takes about half an hour, once. After that, everything in this course, from your first line of code to the app you put online, uses the same setup. Windows 11 and macOS are shown side by side: follow the column for your computer.

What you're installing, and why

Tool What it's for Cost
VS Code A code editor: a text editor made for code. It colors your code so it's easier to read, finishes words as you type and underlines some mistakes. Free
Node.js Runs JavaScript outside the browser, on your own computer. You'll use it to run your programs and the tests that check your exercises. Free
Live Preview An extension (an add-on) for VS Code, made by Microsoft. It shows your web pages in a browser, the way a real website would send them. Free
A browser Shows web pages, and has the developer tools you'll use to see what your code is doing. Free

You need a computer with Windows 11 or macOS that you can install software on, and an internet connection.

A terminal, in one minute

Most of the time you'll click buttons and menus. Often, though, you'll type a command instead, in a terminal: a window where you type an instruction, press Enter, and read the answer. It's like texting a very literal assistant: you type "install VS Code", and it does exactly that, no more and no less.

Commands are typed exactly as shown, spaces and dashes included. If a command doesn't work, the terminal prints a message saying why, and nothing is harmed.

On Windows 11 the terminal app is called Terminal: open the Start menu and type terminal. On macOS it's Terminal too, in Applications > Utilities. Once VS Code is installed, you'll use the terminal built into it instead.

Install VS Code and Node.js

Windows 11 macOS
How Open Terminal and type each command below, then press Enter. Click Yes if Windows asks whether the app may make changes. If you already use Homebrew, type each command below in Terminal. If you don't, use the download pages instead: you don't need Homebrew for this course.
VS Code winget install -e --id Microsoft.VisualStudioCode brew install --cask visual-studio-code
Node.js winget install -e --id OpenJS.NodeJS.LTS brew install node

winget is the Windows Package Manager: a program built into Windows 11 that installs other programs by name. Homebrew does the same job on a Mac, with the command brew. On either computer, the download pages work too:

  • VS Code: code.visualstudio.com. Download the installer for your computer, open it and accept the suggested settings. On macOS, drag Visual Studio Code into your Applications folder.
  • Node.js: nodejs.org. Choose the version marked LTS, download the installer and accept its suggested settings. LTS means long-term support: the version that gets fixes for the longest, which is the one to choose.

Node.js 26 became the LTS version in October 2026, so a new install may give you 26 or 24, depending on the installer. Both work: every program in this course runs on Node.js 24 or newer.

Check Node.js in VS Code's terminal

Close VS Code completely if it's open, and open it again, so it can find the newly installed Node.js. Then open VS Code's own terminal: choose Terminal > New Terminal, or press Ctrl+` (Ctrl and the backtick key, to the left of the 1 key; it's Ctrl on macOS too). A panel opens at the bottom of the window with a blinking cursor. Type this and press Enter:

node --version

--version is read "dash dash version": it asks a program which version it is. Node answers with its version number, starting with a v. Yours may be newer than this, or start with 24:

v26.13.0

That number means Node.js is installed and VS Code's terminal can find it. Node also brought npm, a tool for adding other people's code to a project; you'll meet it in Module 6.

Install Live Preview, and make a folder for the course

  1. In VS Code, click the Extensions icon on the left (four small squares), or press Ctrl+Shift+X (Cmd+Shift+X on macOS).
  2. Search for Live Preview.
  3. Choose Live Preview by Microsoft, and click Install.

Or install it from VS Code's terminal with one command (ms-vscode.live-server is the extension's id, its exact name in the marketplace):

code --install-extension ms-vscode.live-server

On a Mac, if you installed VS Code from the download page, the terminal doesn't know the code command yet. Open the Command Palette (Cmd+Shift+P), type shell command, and run Shell Command: Install 'code' command in PATH. Then close and reopen VS Code.

Now make a home for your work. In your Documents folder, make a folder named javascript-course. In VS Code, choose File > Open Folder and open it. If VS Code asks whether you trust the authors of the files, choose Yes: they're your own. Every lesson's examples and every exercise go in their own folder inside this one.

A browser. You already have one. Any current version of Chrome, Edge, Firefox or Safari works for this course, and browsers keep themselves up to date. The lessons show Chrome's developer tools, and Edge's are the same. It's worth having two browsers, because code you write should work in both.

VS Code with the javascript-course folder open in the Explorer on the left and the terminal at the bottom, showing node --version and its answer, v26.13.0

Try it. In VS Code's terminal, run node --version again, then code --version. Each prints a version. If both do, your computer is ready for your first program.

If something goes wrong

What you see What it means, and what to do
The term 'node' is not recognized (Windows) or zsh: command not found: node (macOS) The terminal can't find Node.js: it isn't installed yet, or VS Code was open while it installed. Close VS Code completely, open it again and retry. If it still happens, install Node.js again from nodejs.org.
zsh: command not found: code (macOS) VS Code's command isn't on the PATH yet: the terminal doesn't know where to find it. Run Shell Command: Install 'code' command in PATH from the Command Palette (Cmd+Shift+P), then close and reopen VS Code.
winget isn't recognized (Windows) winget comes with Windows 11's App Installer. Update App Installer from the Microsoft Store, or use the download pages instead.
brew: command not found (macOS) Homebrew isn't installed. Use the download pages instead: you don't need Homebrew for this course.
node --version prints a number that starts with v22 or lower That Node.js is older than this course needs. Install the LTS version again, then close and reopen VS Code.
No Live Preview in the Extensions search Check the spelling, and look for the one published by Microsoft.

Check yourself

2 questions to try on the lesson page.

So what

You now have the same kit professional JavaScript developers use every day: an editor, a browser, a terminal and Node.js. Everything else in this course is built with these.

Key terms

Cheat sheets