-
Notifications
You must be signed in to change notification settings - Fork 0
Functions
Sami edited this page Oct 30, 2025
·
2 revisions
To run your Kong program, you first need a main function.
In Kong, functions are designed like this: Funk name(params) -> returnType {body}
The main function is prototyped like this:
Funk main() -> Int {
print("Hello World");
Return 0;
} // -> Helllo WorldYou can assign return values of functions to the variables you create:
Funk add(Int: a, Int: b) -> Int {
Return a + b;
}
Funk main() -> Int {
Int a = 6;
Int b = 7;
Int sum = add(a, b);
print(sum);
}
// -> 13



