Skip to main content

Environment Setup

Setting up your JavaScript environment allows you to write, test, and run your code efficiently. Unlike languages like Java or C++, JavaScript was originally designed specifically for web browsers. However, modern JavaScript can run anywhere thanks to Node.js.

1. The Browser Console​

Every modern web browser comes with a built-in JavaScript engine.

  • Open Google Chrome.
  • Right-click anywhere and select Inspect.
  • Click the Console tab. You can type JavaScript directly into this console and hit Enter to jump right in without installing any tools!

2. Setting up an IDE​

To write complex applications, you need a Code Editor. Visual Studio Code (VS Code) is the industry standard for web development.

  • Download and install VS Code.
  • Install extensions such as Prettier (for formatting) and Live Server (to serve your HTML/JS files easily).

3. Node.js​

If you want to run JavaScript outside of the browser (like building servers or running pure JS logic files), you need Node.js.

  • Head to nodejs.org and download the LTS (Long Term Support) version.
  • Verify installation by opening your terminal and typing:
node -v