> 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/condition.md).

# Condition

The writing of a condition is the following

```typescript
@Event('start') 
start() {
    > How old are you ?
    Prompt()
    if (:text > 18) {
        > You are major
    }
    else if (:text < 18) {
        > You are a minor
    }
    else {
        > You are 18 years old
    }
}
```

### Keywords

To verify that a value is either `undefined` or `null`, use the keyword `unknown`

```typescript
foo(options) {
    if (unknown options) {
        > options are empties
    }
}
```

Otherwise, to verify that a value is different from `undefined` or `null`, let's use the keyword `defined`

```typescript
foo(options) {
    if (defined options) {
        > thanks
    }
}
```

> Note that these keywords must be at the beginning of the condition, we can not do `true && defined options`
