Skip to the content

Lesson 4 of 296

Your tools

What you will learn

  • What a code editor is and which one to use
  • What browser developer tools are and how to open them
  • What the terminal is and the first commands to know
On this page

1. The code editor

Code is plain text. You could write it in Notepad, but a code editor is made for the job. It gives you:

  • colours for different parts of the code, so it is easier to read
  • warnings when you make a typing mistake
  • a list of all the files in your project
  • a built-in terminal

The most used editor is Visual Studio Code (VS Code). It is free and works on Windows, Mac and Linux. This course uses it.

Important for interviews: many coding tests use a very simple editor with no automatic help. Practise sometimes with auto-complete switched off so you can write code from memory.

2. Browser developer tools

Every modern browser has a hidden panel for developers called developer tools, or dev tools.

How to open it in Chrome:

ComputerKeys
Windows / LinuxF12 or Ctrl + Shift + I
MacCmd + Option + I

You can also right-click anywhere on a page and choose Inspect.

The three tabs you will use most:

TabWhat it shows
ElementsThe HTML and CSS of the page. You can change them and see the result at once.
ConsoleMessages and errors from JavaScript. You can also type JavaScript here and run it.
NetworkEvery request the page sends and every response it gets.

Try it: the Console

Open dev tools, click the Console tab, type this and press Enter:

2 + 2

The console shows 4. You have just run JavaScript. Now try:

console.log("Hello");

It shows Hello. console.log() is the command that prints a value in the console. Developers use it all the time to check what their code is doing.

3. The terminal

The terminal (also called the command line) is a window where you control the computer by typing commands, not by clicking. Developers use it to start projects, install tools, run code and use Git.

How to open it:

ComputerHow
MacOpen the app called Terminal
WindowsOpen PowerShell, or install WSL to get a Linux terminal
VS CodeMenu: Terminal, then New Terminal

First commands

These work on Mac, Linux and WSL.

CommandWhat it doesExample
pwdShows which folder you are in nowpwd
lsLists the files in this folderls
cdMoves to another foldercd projects
cd ..Moves up one foldercd ..
mkdirMakes a new foldermkdir my-site
touchMakes a new empty filetouch index.html
clearCleans the screenclear

Example session

pwd                 shows: /Users/sam
mkdir my-site       makes a folder called my-site
cd my-site          goes into it
touch index.html    makes an empty file
ls                  shows: index.html

Part 8 teaches the terminal in more detail.

Common mistakes

  • Typing a command in the wrong folder. Always check with pwd first.
  • Ignoring the Console tab. When a page does not work, the Console usually already shows the reason in red.
  • Capital letters. The terminal treats Projects and projects as different names on most systems.

How to say it in an interview

"I use VS Code as my editor. I use the browser dev tools daily: the Elements tab to inspect HTML and CSS, the Console to see errors and test JavaScript, and the Network tab to check requests and responses. I am comfortable in the terminal for running projects, installing packages and using Git."

Key words

WordMeaning
Code editorA program for writing code
Dev toolsThe developer panel built into the browser
ConsoleThe place where JavaScript messages and errors appear
TerminalA window where you type commands to control the computer
CommandOne instruction typed into the terminal

Now prove it

This lesson is complete when you pass the quiz and all three practice levels.