Data type

Names and abbreviations on this page

MDN — MDN Web Docs (formerly Mozilla Developer Network). Reference material for web programming.

Programming terms & practical skills

What it means

A data type describes the kind of value a program works with, such as a number, text or a true-or-false value. Types influence which operations are meaningful. Different languages handle type checking and conversion differently.

Related skills

Identify valuesDistinguish numeric amounts from text labels.

Convert deliberatelyRead and validate form input before using it in calculations.

Handle absenceDecide what an empty or missing value means.

An everyday example

A form may supply the characters 1200 as text. A calculation must interpret that input correctly before adding 150. In some languages, joining text can produce 1200150 instead of arithmetic addition.

What to check

A blank entry is not automatically a genuine zero. Give users a clear way to distinguish missing information from a zero amount.

Related learning

Variable

Condition

Debugging

Learning & Skills

External Resources

MDN — Data structures and types