Section 1 - Instruction

Think of variables as labeled containers that hold information in JavaScript. Just like you might put cookies in a jar labeled "cookies," variables store data with descriptive names.

Variables are essential because they remember information like user input, scores, or settings.

Engagement Message

What kind of information might a shopping website need to remember about you?

Section 2 - Instruction

In JavaScript, you create variables using special keywords. The most common one is let. Here's the basic pattern:

let userName = "Sarah";

This creates a container called userName and puts the text "Sarah" inside it.

Engagement Message

What do you think the equals sign = does in this example?

Section 3 - Instruction

JavaScript can store different types of data. Numbers are one important type—they can be whole numbers like 42 or decimals like 3.14.

let age = 25; let price = 19.99;

Both of these store numeric values that you can use for calculations.

Engagement Message

Can you think of two numbers a website might need to store?

Section 4 - Instruction

Text data is called a in JavaScript. Strings are always wrapped in quotes—either single quotes or double quotes .

Sign up
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal