---
title: "init(_:)"
framework: swift
role: symbol
role_heading: Initializer
path: "swift/array/init(_:)-1ip9h"
---

# init(_:)

Creates a new instance of a collection containing the elements of a sequence.

## Declaration

```swift
init<S>(_ elements: S) where S : Sequence, Self.Element == S.Element
```

## Parameters

- `elements`: The sequence of elements for the new collection.

## See Also

### Creating an Array

- [init()](swift/array/init().md)
- [init(_:)](swift/array/init(_:)-236cl.md)
- [init(repeating:count:)](swift/array/init(repeating:count:).md)
- [init(unsafeUninitializedCapacity:initializingWith:)](swift/array/init(unsafeuninitializedcapacity:initializingwith:).md)
