# Spread

The spread operator `...` can be used to spread the contents of a map or array across function arguments or array/object constructors, depending on the situation.

Anothor primary use-case is to output results as separate documents when put at the end of the output statement.

## Examples

```
doSomething([1, 2, 3]...)
// equivalent to doSomething(1, 2, 3)

[[1, 2, 3]..., 4, 5, 6]
// resolves to [1, 2, 3, 4, 5, 6]

{ {"firstName": "Tom"}..., "lastName": "Wright" }
// resolves to { "firstName": "Tom", "lastName": "Wright" }

[1, 2, 3]...
// 1
// 2
// 3
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://daseldocs.tomwright.me/syntax/spread.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
