Skip to content

Functions

Declaring a function works with the fn keyword. Functions are local by default.

fn Greet(name) {
Pewpew:Print("Hello" .. name .. "!")
}
Greet("John") // -> Hello, John!

Functions can be anonymous, too! Useful for callbacks.

let Greet = fn (name) {
Pewpew:Print("Hello" .. name .. "!")
}
Greet("John") // -> Hello, John!