Skip to content

Functions

Julius Paffrath edited this page Jun 27, 2026 · 7 revisions

A function consists of a name, a list of parameters and a body:

function greetUserWith(name: str)
    print("Hey, " + name + "!")
end

A function can be overloaded:

function greetUserWith(name: string, welcomeMessage: string)
    print("Hey, " + name + "!")
    print("\n" + welcomeMessage)
end

jask always uses pass by value for parameters.

Clone this wiki locally