Variables
Variables are like containers that hold a value.
The type of value is the DataType
DataType
- Number
- Character (ie. 'a', 'b', 'c', etc...)
- Array (Special)
- Boolean
Number
As simple as it sounds, a number can have many different datatypes.
floatordoubleare decimal-point numbers, difference is in its accuracy (@advanced: how does a computer store numbers & therefore whats the difference between the 2?)intis used to store a whole number (@advanced: does it always store in base 10?)
Characters
Characters refer to a single, ONE letter.
Of course 1 letter is pretty useless unless it can be used as a String.
A String is an array of characters, allowing multiple characters to be stored in 1 vairable, that is a String.
Array
An array is a special data type, it is able to store multiple variables in 1 variable. (re-read that to take it in).
Boolean
A boolean is a variable that only have 2 states: - 1 or 0 - True or False. - Yes or No
It is usually a DataType of its own in MOST high level programming langauges.
Advanced
(@advanced) Primitive vs Derived DataTypes: Derived DataTypes are when a programmer defines their own Datatype using the primitive ones (@google)