e, which means the following number is an exponent.
false. Their main use is to indicate whether or not an operation or function call is successful, and used to indicate truthiness in a condition expression, which is covered in the Operators page.
nil), and the value can be any type of value. All values must be separated by a comma.
key. If square brackets are used, the key can be of any type, but writing the key plainly is a shortcut for a key with a
stringtype. Here's a simple example of an array of numbers:
stringtype, since no brackets are used. The exact same can be written with square brackets like so:
table.key. The difference between both is the same concept as before: with square brackets the key can be of any type, with the period the key must be a
string. Here's an example:
averagewhich calculates the average of the parameters passed (a & b), and uses the
returnkeyword to give back a value which we use to show its output to the console.
function_name(param1, param2, etc)
average(5, 7)is inserted as the first parameter. However, if you don't call the function, it would give an output like this:
.syntax used for tables normally:
table.insert, which is part of the
...) that holds any number of values passed to it. The best example of this is the
...holds the rest of the arguments passed to the function, and it is dumped into a table so we can access them, then the rest is just outputting each argument in sequence along with a new line.
..., which can't be accessed out-of-the-box like a & b can.