Mamun Labs Learn
JourneyGlossary
esc
  • Try “map”, “flexbox” or “state”.
Log in
Start learning
Phase 0 · 4 / 6Set up VS Code and Node
Phase 0Getting started
6 topics · 1–2 wks
  1. 1What a computer actually does
  2. 2Files, folders and paths
  3. 3The terminal, step by step
  4. 4Set up VS Code and Node
  5. 5Git and GitHub basics
  6. 6Using AI as a study partner
JourneyPhase 0Set up VS Code and Node
01 / 08Overview

Set up VS Code and Node

You'll learn to install VS Code and Node.js, open a project folder, and run your first JavaScript file.

Why it mattersVS Code is where you will read and write all your code, and Node lets you run JavaScript outside the browser.
about 60 min·needs: The terminal, step by step
02 / 08

Watch & read

Start with the required ones. The others are there when you need them.

Video
Learn Visual Studio Code in 7 minutesVisual Studio Code (official) · YouTube · 7 min · English
MMamun's noteWatch 0:00 to 3:25. That covers opening a folder, the layout, making a JavaScript file and saving. Skip the Python and HTML preview parts.
Docs
Node.js tutorial in Visual Studio CodeVS Code docs · 15 min · English
MMamun's noteFollow the start and the Hello World part, including the integrated terminal. Stop at "An Express application". That is for much later.
Tool
Download Node.jsnodejs.org · English
MMamun's notePick the LTS version for your system. Use the installer if the other options look confusing.
DocsOptional
Terminal basics in VS CodeVS Code docs · English
MMamun's noteRead only if the terminal panel confuses you. The first part is enough.
03 / 08

Explanation

You need two tools before you write any code. A place to write it, and something that can run it.

VS Code is a free code editor. It is like a notebook made for code: it colours the words, shows your folders on the left, and has a terminal built in. Node.js is a program that runs JavaScript files on your computer, outside the browser.

Install both:

  1. VS Code from code.visualstudio.com.
  2. Node.js from nodejs.org. Pick the LTS version. LTS means "long-term support": the stable one.

Now make a folder for your work, like projects/hello, with lowercase and no spaces. In VS Code, use File, Open Folder and pick it. Always open the folder, not a single file. Then open the built-in terminal with View, Terminal. It starts inside your folder already.

Check Node is installed, then make and run a tiny file:

node --version
v22.11.0
// hello.js
const name = "Nusrat";
console.log("Hello, " + name);

Save it, then type node hello.js in the terminal. You should see Hello, Nusrat. Your version number may be different. Any recent LTS number is fine.

People often run node hello.js from the wrong folder, or forget to save first. Then Node says Cannot find module or runs the old code. Check the terminal's folder with pwd, and look for the white dot on the file's tab: it means "not saved yet".

Keep extensions to a minimum. Prettier tidies your code's spacing when you save. ESLint points out some mistakes, and you can add it later. You do not need anything else for now.

When you look at VS Code, find three things: the folder tree on the left, the open file in the middle, and the terminal at the bottom. If the terminal's folder and the file's folder match, node will find it.

Words to recognise
VS CodeeditorNode.jsLTSintegrated terminalnode --versionextension.js
04 / 08

Code tour

Click a line number with a ring to read the note for that line.

terminal6 notes
$ pwd
Mentor note · line 1
In the VS Code terminal, check where you are first. It should be your project folder.
2/Users/nusrat/projects/hello
$ ls
4hello.js
$ node --version
6v22.11.0
$ node hello.js
8Hello, Nusrat
$ node helo.js
Error: Cannot find module '/Users/nusrat/projects/hello/helo.js'
05 / 08

Quick check

3 questions. Each one explains itself after you answer.

  1. 1 / 3Which Node.js version should you install?
  2. 2 / 3You run node hello.js and see Cannot find module. What should you check first?
  3. 3 / 3Why open a whole folder in VS Code, not just one file?
06 / 08

Explain it back

Only you can see this. Log in to keep it.0 words
07 / 08

How confident are you with Set up VS Code and Node?

08 / 08

Done

You can now
Open a project folder in VS Code, use its built-in terminal, and run a .js file with node.
Next: Git and GitHub basics Back to Phase 0
On this page
  1. 01Set up VS Code and Node
  2. 02Watch & read
  3. 03Explanation
  4. 04Code tour
  5. 05Quick check
  6. 06Explain it back
  7. 07Confidence
  8. 08Done
Up next · 02 / 08Watch & read
Mamun Labs LearnFound a mistake on this page? Tell Mamun.
Mamun Labs Learn
JourneyGlossary
esc
  • Try “map”, “flexbox” or “state”.
Log in
Start learning
Log in to save your progress. Everything here works without an account.Log in to save progressLog in
Phase 0Getting started
6 topics · 1–2 wks
  1. 1What a computer actually does
  2. 2Files, folders and paths
  3. 3The terminal, step by step
  4. 4Set up VS Code and Node
  5. 5Git and GitHub basics
  6. 6Using AI as a study partner
JourneyPhase 0Set up VS Code and Node
01 / 08Overview

Set up VS Code and Node

You'll learn to install VS Code and Node.js, open a project folder, and run your first JavaScript file.

Why it mattersVS Code is where you will read and write all your code, and Node lets you run JavaScript outside the browser.
about 60 min·needs: The terminal, step by step
02 / 08

Watch & read

Start with the required ones. The others are there when you need them.

Video
Learn Visual Studio Code in 7 minutesVisual Studio Code (official) · YouTube · 7 min · English
MMamun's noteWatch 0:00 to 3:25. That covers opening a folder, the layout, making a JavaScript file and saving. Skip the Python and HTML preview parts.
Docs
Node.js tutorial in Visual Studio CodeVS Code docs · 15 min · English
MMamun's noteFollow the start and the Hello World part, including the integrated terminal. Stop at "An Express application". That is for much later.
Tool
Download Node.jsnodejs.org · English
MMamun's notePick the LTS version for your system. Use the installer if the other options look confusing.
DocsOptional
Terminal basics in VS CodeVS Code docs · English
MMamun's noteRead only if the terminal panel confuses you. The first part is enough.
03 / 08

Explanation

You need two tools before you write any code. A place to write it, and something that can run it.

VS Code is a free code editor. It is like a notebook made for code: it colours the words, shows your folders on the left, and has a terminal built in. Node.js is a program that runs JavaScript files on your computer, outside the browser.

Install both:

  1. VS Code from code.visualstudio.com.
  2. Node.js from nodejs.org. Pick the LTS version. LTS means "long-term support": the stable one.

Now make a folder for your work, like projects/hello, with lowercase and no spaces. In VS Code, use File, Open Folder and pick it. Always open the folder, not a single file. Then open the built-in terminal with View, Terminal. It starts inside your folder already.

Check Node is installed, then make and run a tiny file:

node --version
v22.11.0
// hello.js
const name = "Nusrat";
console.log("Hello, " + name);

Save it, then type node hello.js in the terminal. You should see Hello, Nusrat. Your version number may be different. Any recent LTS number is fine.

People often run node hello.js from the wrong folder, or forget to save first. Then Node says Cannot find module or runs the old code. Check the terminal's folder with pwd, and look for the white dot on the file's tab: it means "not saved yet".

Keep extensions to a minimum. Prettier tidies your code's spacing when you save. ESLint points out some mistakes, and you can add it later. You do not need anything else for now.

When you look at VS Code, find three things: the folder tree on the left, the open file in the middle, and the terminal at the bottom. If the terminal's folder and the file's folder match, node will find it.

Words to recognise
VS CodeeditorNode.jsLTSintegrated terminalnode --versionextension.js
04 / 08

Code tour

Click a line number with a ring to read the note for that line.

terminal6 notes
$ pwd
Mentor note · line 1
In the VS Code terminal, check where you are first. It should be your project folder.
2/Users/nusrat/projects/hello
$ ls
4hello.js
$ node --version
6v22.11.0
$ node hello.js
8Hello, Nusrat
$ node helo.js
Error: Cannot find module '/Users/nusrat/projects/hello/helo.js'
05 / 08

Quick check

3 questions. Each one explains itself after you answer.

  1. 1 / 3Which Node.js version should you install?
  2. 2 / 3You run node hello.js and see Cannot find module. What should you check first?
  3. 3 / 3Why open a whole folder in VS Code, not just one file?
06 / 08

Explain it back

Only you can see this. Log in to keep it.0 words
07 / 08

How confident are you with Set up VS Code and Node?

08 / 08

Done

You can now
Open a project folder in VS Code, use its built-in terminal, and run a .js file with node.
Next: Git and GitHub basics Back to Phase 0
On this page
  1. 01Set up VS Code and Node
  2. 02Watch & read
  3. 03Explanation
  4. 04Code tour
  5. 05Quick check
  6. 06Explain it back
  7. 07Confidence
  8. 08Done
Up next · 02 / 08Watch & read

You need two tools before you write any code. A place to write it, and something that can run it.

VS Code is a free code editor. It is like a notebook made for code: it colours the words, shows your folders on the left, and has a terminal built in. Node.js is a program that runs JavaScript files on your computer, outside the browser.

Install both:

  1. VS Code from code.visualstudio.com.
  2. Node.js from nodejs.org. Pick the LTS version. LTS means "long-term support": the stable one.

Now make a folder for your work, like projects/hello, with lowercase and no spaces. In VS Code, use File, Open Folder and pick it. Always open the folder, not a single file. Then open the built-in terminal with View, Terminal. It starts inside your folder already.

Check Node is installed, then make and run a tiny file:

node --version
v22.11.0
// hello.js
const name = "Nusrat";
console.log("Hello, " + name);

Save it, then type node hello.js in the terminal. You should see Hello, Nusrat. Your version number may be different. Any recent LTS number is fine.

People often run node hello.js from the wrong folder, or forget to save first. Then Node says Cannot find module or runs the old code. Check the terminal's folder with pwd, and look for the white dot on the file's tab: it means "not saved yet".

Keep extensions to a minimum. Prettier tidies your code's spacing when you save. ESLint points out some mistakes, and you can add it later. You do not need anything else for now.

When you look at VS Code, find three things: the folder tree on the left, the open file in the middle, and the terminal at the bottom. If the terminal's folder and the file's folder match, node will find it.

Words to recognise
VS CodeeditorNode.jsLTSintegrated terminalnode --versionextension.js

You need two tools before you write any code. A place to write it, and something that can run it.

VS Code is a free code editor. It is like a notebook made for code: it colours the words, shows your folders on the left, and has a terminal built in. Node.js is a program that runs JavaScript files on your computer, outside the browser.

Install both:

  1. VS Code from code.visualstudio.com.
  2. Node.js from nodejs.org. Pick the LTS version. LTS means "long-term support": the stable one.

Now make a folder for your work, like projects/hello, with lowercase and no spaces. In VS Code, use File, Open Folder and pick it. Always open the folder, not a single file. Then open the built-in terminal with View, Terminal. It starts inside your folder already.

Check Node is installed, then make and run a tiny file:

node --version
v22.11.0
// hello.js
const name = "Nusrat";
console.log("Hello, " + name);

Save it, then type node hello.js in the terminal. You should see Hello, Nusrat. Your version number may be different. Any recent LTS number is fine.

People often run node hello.js from the wrong folder, or forget to save first. Then Node says Cannot find module or runs the old code. Check the terminal's folder with pwd, and look for the white dot on the file's tab: it means "not saved yet".

Keep extensions to a minimum. Prettier tidies your code's spacing when you save. ESLint points out some mistakes, and you can add it later. You do not need anything else for now.

When you look at VS Code, find three things: the folder tree on the left, the open file in the middle, and the terminal at the bottom. If the terminal's folder and the file's folder match, node will find it.

Words to recognise
VS CodeeditorNode.jsLTSintegrated terminalnode --versionextension.js