In the last section, you were introduced to the concepts of a variable and a value. This section explores the concept of what a value is. Every value has a data type, which intuitively describes what kind of data the value holds. Lua supports eight basic value types:
- nil: The absence of data. This type represents literal nothingness. If a certain piece of data is invalid or unknown, nil is usually the best way to represent that it is invalid or unknown.
- Boolean: A value of true or false. A Boolean value is binary and can only ever be in one of two states, true or false.
- number: A number can represent any real number: 0, -1, 5, or even decimals such as 3.14159265359.
- string: A string is an array of characters. When declaring a string literal, it must be "enclosed within quotation marks."
- function: A function is some code that is referred to by a name and...