Skip to content
ExamplesOpen editor ↗

tiro

→ function

Declares a named function.

tiro leina(diparamethara) { ... }

Use tiro to declare a reusable block of code. Functions can take parameters and return values. The two functions Bopa calls for you, setaLoeto and tshwantsha, are also declared with tiro.

A function that adds two numbers
tiro tlatsa(a, b) {
  busa a + b;
}

busa, diri, metlha