How to Set Up JavaScript on Windows 11
You don’t install JavaScript like a regular app. Browsers—Chrome, Edge, and Firefox—already run it. To write and run JavaScript code on your PC, you need a standalone runtime: Node.js. Here’s how to get everything up and running.
1. Install Node.js
- Open your browser and go to the Node.js download page.
- Click the Windows Installer for your system (choose 64-bit if you’re not sure).
- Run the downloaded file and follow the installer prompts (Next → Accept → Next → Install).
- When installation finishes, reboot if prompted.
2. Verify Your Installation
- Press Windows, type cmd, and open Command Prompt.
- Enter
node -v. You should see the Node.js version number. - Type
nodeand press Enter to enter the Node REPL. - At the prompt (
>), typeconsole.log("hello world")and press Enter. You should see hello world. Type.exitto leave.
3. Run JavaScript with Visual Studio Code
- Install Visual Studio Code if you haven’t already.
- Create a folder for your code—right-click it and choose Open with Code.
- In VS Code, click New File, name it
script.js, and add: javascriptconsole.log("hello world"); - Save the file.
- Open the built-in terminal (View > Terminal).
- Run your script with: bash
node script.jsYou’ll see hello world printed below.
4. Use Code Runner for One-Click Runs
- In VS Code, open the Extensions panel.
- Search for Code Runner and click Install.
- Open your
script.jsfile and click the Run Code ▶️ button at the top right. - The output pane shows your results instantly.
You’re all set. With Node.js installed and VS Code configured, you can write, test, and run JavaScript locally. Next, explore npm packages and frameworks like React or Express to build real projects.

