---
title: "arrayWithArray:"
framework: foundation
role: symbol
role_heading: Type Method
path: "foundation/nsarray/arraywitharray:"
---

# arrayWithArray:

Creates and returns an array containing the objects in another given array.

## Declaration

```occ
+ (instancetype) arrayWithArray:(NSArray<id> *) array;
```

## Parameters

- `array`: An array.

## Return Value

Return Value An array containing the objects in anArray.

## See Also

### Related Documentation

- [initWithObjects:](foundation/nsarray/initwithobjects:.md)

### Creating an Array

- [array](foundation/nsarray/array.md)
- [arrayWithContentsOfFile:](foundation/nsarray/arraywithcontentsoffile:.md)
- [init(object:)](foundation/nsarray/init(object:).md)
- [arrayWithObjects:](foundation/nsarray/arraywithobjects:.md)
- [init(objects:count:)](foundation/nsarray/init(objects:count:)-7dct1.md)
