---
title: "init(array:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/nsarray/init(array:)-o72h"
---

# init(array:)

Initializes a newly allocated array by placing in it the objects contained in a given array.

## Declaration

```swift
convenience init(array: [Any])
```

## Parameters

- `array`: An array.

## Return Value

Return Value An array initialized to contain the objects in anArray. The returned object might be different than the original receiver.

## Discussion

Discussion After an immutable array has been initialized in this way, it cannot be modified.

## See Also

### Related Documentation

- [init(object:)](foundation/nsarray/init(object:).md)

### Initializing an Array

- [init()](foundation/nsarray/init().md)
- [init(array:copyItems:)](foundation/nsarray/init(array:copyitems:).md)
- [init(contentsOfFile:)](foundation/nsarray/init(contentsoffile:).md)
- [init(objects:count:)](foundation/nsarray/init(objects:count:)-5odxv.md)
