Swipe
SwipeSwipe
Swipe Apps

Paths

Motivation

Information

Your First Program · Lesson 5 of 15

Console & Developer Tools

A free lesson from Swipe Coding · JavaScript, level 2 · updated October 2026

By the Swipe team, founded by Colin · how we make lessons

🤖
Every browser hides a debugging toolkit behind one keypress. Let's go find it. 🔍

Every browser includes a set of built-in Developer Tools for inspecting, testing, and debugging what's happening on a web page. You can open them by pressing F12, or by right-clicking anywhere on a page and choosing "Inspect."

One of the most useful panels inside Developer Tools is the Console tab. It shows messages that JavaScript running on the page has logged, along with any errors or warnings — and it also works as a live JavaScript prompt where you can type code and run it immediately.

console.log('Debugging message here');
console.log() prints a message to the Console tab — the most common way developers check what their code is doing.
🤖
You'll type console.log() more than almost any other line of code. Get comfortable with it. 📝

console.log() can print numbers, text, variables, or several values at once separated by commas. Sprinkling console.log() calls through your code is one of the simplest and most common ways to 'peek inside' a program while it runs and see exactly what's happening.

let score = 10;
console.log('Current score:', score);
Passing multiple values to console.log() prints them together, separated by a space, which is handy for labeling what a number means.
Fill in the blank

The browser panel used to inspect, test, and debug code on a web page is called ____.

Quick check

Which function is most commonly used to print messages to the browser console for debugging?

True or false

You can type and run JavaScript directly inside the Console tab of Developer Tools.

Keep your streak going in Swipe Coding

Swipe through every level of JavaScript on your iPhone — with XP, stars, streaks, a personal advisor and the full track beyond these free levels.

Get the Swipe apps →