Learn JavaScript
❯ getting_started.setup

Setup: Browser Console & Node.js in JavaScript

$concept

JavaScript needs no toolchain to start: every browser ships a console (F12 or Cmd+Option+J) that executes code instantly — the fastest way to experiment. For files and servers, Node.js (from nodejs.org, LTS version recommended) runs .js files from a terminal with node app.js and ships npm for libraries.

An editor like VS Code with JavaScript support adds inline errors and autocomplete. That's the whole setup ladder: console for experiments, editor plus Node for real programs — no compiler, no build step, no virtual environment.

$how it works
1

Open a browser console

F12 (or Cmd+Option+J on Mac) opens DevTools — the Console tab runs any JavaScript immediately with output inline.

2

Install Node.js for files

Download the LTS from nodejs.org; node --version in a terminal confirms it, and node app.js runs a file.

3

Pick an editor

VS Code understands JavaScript out of the box — errors underlined as you type, plus an integrated terminal.

4

Console vs files

The console suits experiments (state persists between lines); files suit programs (rerunnable, shareable, version-controlled).

$example
$ node --version
$ node hello.js
Output
v20.11.0
Hello from a file!
1node --version prints the installed runtime — failure here means Node isn't on the PATH yet.
2node hello.js executes the file top to bottom, printing its console.log output to the terminal.
3Same language as the browser console, now running scripts and servers outside any page.
$use cases
Trying syntax instantly in the console before committing it to a file
Running course examples with node as you read each lesson
Checking a teammate's environment with one version command
Choosing LTS Node for stability over bleeding-edge releases

Recommended resourcesAffiliate links · may earn us a commission

Recommended for learners

Structured coding coursesVideo courses that pair well with visual practice — pick one language and go deep.Browse courses Pro code editor & AI assistantWrite, debug and explain code faster while you practice the patterns here.Try it free Classic DSA interview booksThe reference books interviewers themselves learned from — great next to the visualizers.See the books

Practice what you learned

Re-implement each visualized algorithm in JavaScript yourself — building beats watching.