# `syntax.new_keyword`

Value created with `new`.

Area 2, [Values and types](../topics/values-and-types.md); not declinable; the next step is usually the agent's.

A value is made with `Type(value)`, or an object with `Type { field: value }`, without `new`.

```jadpo
type CustomerNote = Text {
    max_length: 500
}

type NoteWasEdited = Bool {}

function edited(before: CustomerNote, after: CustomerNote) -> NoteWasEdited {
    return new NoteWasEdited(before != after)
}
```

```text
error: Jadpo creates a value without `new`
 --> main.jadpo:8:12
  |
8 |     return new NoteWasEdited(before != after)
  |            ^^^ remove `new`
  reason: `new` creates an object in JavaScript, TypeScript, Java and C#; Jadpo creates a value with `Type(value)`, or an object with `Type { field: value }`.
  next: Remove `new` (agent)
  rule: syntax.new_keyword
  help: https://jadpo.dev/docs/errors/syntax.new_keyword

check failed: 1 error, 1 file
```
