String
Number
Boolean
"Plain Text"

The Building Blocks

Data types are the different kinds of values we can use. JavaScript has 'Primitive' types (simple values) and 'Reference' types (complex structures). Let's start with the basics.

Strings (Text)

A String is just text. We wrap it in quotes: "double" or 'single'. It's a sequence of characters, like a necklace of letters. You can add them together!

Numbers (Math)

Numbers are for math. No quotes needed! Integers (10) and decimals (10.5) are all just 'Number' type in JS. You can add (+), subtract (-), multiply (*), and divide (/).

Booleans (Logic)

Simple True or False. Like a light switch. Essential for making decisions in your code: 'if (isOnline) { showChat() }'.

Objects (Collections)

An Object is a collection of related data. It uses keys and values, like a dictionary. '{ name: "Dev", level: 1 }'. Great for grouping things together.

Arrays (Lists)

An Array is an ordered list of items. We use square brackets '[]'. Great for lists of things: '["Apple", "Banana", "Cherry"]'.

Level Up!

You now know the basic building blocks of data.
Next, let's learn how to make decisions with Conditionals.

AlgoAnimator: Interactive Data Structures