Functions

Functions take and return values.

func greet(name) {
    return `Hello, {name}!`
}

greet('Alice')  // returns "Hello, Alice!"
greet('Bob')    // returns "Hello, Bob!"

Last updated