---
title: "init(arrayLiteral:)"
framework: swift
role: symbol
role_heading: Initializer
path: "swift/simd2/init(arrayliteral:)"
---

# init(arrayLiteral:)

Creates a vector from the specified elements.

## Declaration

```swift
init(arrayLiteral scalars: Self.Scalar...)
```

## Parameters

- `scalars`: The elements to use in the vector. scalars must have the same number of elements as the vector type.
