Description: Function declaration keyword. Used to define functions with parameters and return types.
Example #
fn add(a: Int, b: Int) -> Int {
a + b
}
fn greet(name: String) {
print("Hello, " + name)
}
Function declaration keyword. Used to define functions with parameters and return types.
Description: Function declaration keyword. Used to define functions with parameters and return types.
fn add(a: Int, b: Int) -> Int {
a + b
}
fn greet(name: String) {
print("Hello, " + name)
}