Documentation

Student-friendly HTML, CSS, and JavaScript reference with examples

Sections

Types of Data

"Ada", 42, true

Data comes in different kinds, and code treats each kind differently.

"Ada"      // text — a string
42         // a number
true       // yes/no — a boolean

Text (Strings)

Wrapped in quotes: "hello", "Ada Lovelace", "42" — yes, even digits in quotes are
text, not a number.

Numbers

No quotes: 42, -7, 3.14.

Booleans

Only two possible values: true or false. Nothing in between.

Why the Type Matters

"5" + "5"   // "55" — text glued together
5 + 5       // 10  — actual math

Same symbol, +, completely different result — because the type is different.