Every craftsperson needs tools. A carpenter has a hammer and a saw. A chef has knives and pots. A JavaScript programmer has... a web browser and a text editor. (Admittedly less dramatic. But also much harder to cut yourself with.)
Here's everything you'll use in this book:
| Tool | What it's for | Cost |
|---|---|---|
| A web browser (Chrome, Firefox, Edge, Safari, Brave) | Running JavaScript and seeing the results | Free |
| A code editor (we recommend Visual Studio Code) | Writing and saving your code | Free |
| Node.js | Running JavaScript outside the browser | Free |
That's the whole list. No credit card required. Your wallet can relax.
The web browser
You already have one. Any modern browser works, but we'll use Google Chrome in our examples because its developer tools are popular and easy to find. Firefox, Edge and Brave all have nearly identical tools, so feel free to use whichever you like.
The code editor
You could write code in Notepad. People have. People have also crossed oceans in rowing boats. Doesn't mean you should.
A proper code editor colors your code to make it easier to read (this is called syntax highlighting), suggests words as you type, catches some mistakes, and keeps your files organized. Our favorite for beginners is Visual Studio Code, usually called VS Code. It's free, it runs on Windows, Mac and Linux, and lots of professional developers use it every day.
To install it:
- Go to code.visualstudio.com
- Download the version for your computer
- Install it like any other program
- Open it up and admire how professional you look
Never write code in Microsoft Word, Google Docs, or similar programs. They secretly change your straight quotes " into curly "smart quotes" and add hidden formatting. JavaScript will look at those smart quotes and have absolutely no idea what they are. Always use a plain-text code editor.
Node.js
Node.js lets you run JavaScript files directly on your computer, without a browser. We'll install it a little later in this grade. You'll find it super handy for practicing.