// set of given information (only one type)
var <name> = [<info>, <info>]
var <name>: [<type>] = []
Back
function
Front
// self-contained chunks of code that perform a specific task
func <name>(<parameters, if any>) {}
// function that returns information
func <name>(<name>: <input>) -> <type> {
<code(if any)
return <stuff to return>
}
Back
variable
Front
// named storage with type
var <name> = info
Back
class
Front
// set of instructions (methods/properties) that can be accessed/carried out
class <name> {
}
Back
loop
Front
// repeats actions in it a given no. of times
for <name> in 1...<Int> {
}
for <item> in <array> {
}