Calling Functions

← Back to documentation


Description

Functions are called by name with parentheses containing the argument.

Syntax

name(argument)

Examples

Basic call

func square(x) x * x
print(square(5))
# Output: 25

Nested calls

func add(x) x + 5
func mul(x) x * 2
result = add(mul(10))
print(result)
# Output: 25

Call with expression

func square(x) x * x
print(square(3 + 2))
# Output: 25

Built-in Functions

print()

print("Hello")
print(42)
print([1, 2, 3])

length()

arr = [1, 2, 3, 4, 5]
print(length(arr))
# Output: 5

See Also


© 2026 elliktronic · Jaf Language