> For the complete documentation index, see [llms.txt](https://docs.newbot.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.newbot.io/conversescript-syntax/functions.md).

# Functions

A function is very often a dialogue. The writing is as follows:

```typescript
nameFunction() {

}
```

A function can contain parameters:

```typescript
nameFunction(args1, args2) {

}
```

### Trigger a function

A function is delineated as follows:

```typescript
nameFunction()
```

A decorator can indicate the role of a function and trigger it according to a situation

### Return of a function

A function can return a value

```typescript
start() {
    str = nameFunction()
}

nameFunction() {
    return 'hello'
}
```

> Warning, unlike JS, the `return` keyword must return a value. He can not be alone
