# CommandResult.code

Get the exit code from a command execution.

```rhai
result.code -> i64
```

Returns the integer exit code of the command. 0 indicates success, non-zero indicates failure.

## Example

```rhai
let result = execute("exit 42")
    .ignore_error()
    .run()?;
print(`Exit code: ${result.code}`);  // "Exit code: 42"
```
