Functions

Functions allow reusable code.

Example:

func greet(name) {
    print("Hello")
    print(name)
}

Call the function:

greet("World")

Example with return values:

func add(a, b) {
    return a + b
}

let result = add(5, 3)
print(result)

Output:

8