1 min to read
What is a data type?
A bit of information (data) always has a certain type
Each programming language has different data-types or names them differently, but most of them have a variation of these four:
Booleans are simple binary values (
isTrue = true isFalse = false
In our previous article about if statements we showed you how programs determine between executing a block of code or not. The condition that is used for this can ultimately only have two outcomes: do it (
true) or don’t do it (
Integers are whole numbers (with no decimal places).
number = 5
Floats are numbers that can have decimals, but do not always have to.
number = 3.5
Strings are simply a series of characters (like words, names or whole sentences)
id = ckjasdiwe98213 name = John lastname = Doe job = John is working at a farm, growing potatoes