Let’s face it: Sometimes, writing code on a Windows PC is no picnic.
Unlike in Mac OS X or with a Linux distribution, you don’t have easy access to a Bash terminal. Installing what you need can sometimes be a nightmare.
Let’s start with a code editor. If you already have your preferred code editor installed, great; if not, let’s go with Visual Studio Code (a popular choice and my personal preference). The default settings in the installer are fine.
Now for the terminal. There are a few different options you can use for this; we’ll use Git for Windows. Click download, then open the file to get started with the install. When it asks you to choose the default editor, choose Visual Studio Code (or your preferred editor if you’re using that instead). It should be fine to stick with the default for the rest of the installer prompts.
And we’re done! Open Git Bash (aka Git for Windows) and type
To write actual full-fledged programs, you’ll probably want to use Visual Studio Code (or your preferred editor). To run those programs, just use Git Bash navigate to the directory where they’re stored (you can find many tutorials for this online if you’re unfamiliar with how to use a Bash terminal). Then type
node [filename] to run the program — for example, if the file is called index.js, type
node index.js and hit Enter.