---
title: shuffled()
framework: foundation
role: symbol
role_heading: Instance Method
path: foundation/nsarray/shuffled()
---

# shuffled()

Returns a new array that lists this array’s elements in a random order.

## Declaration

```swift
func shuffled() -> [Any]
```

## Return Value

Return Value A new array that lists this array’s elements in a random order.

## Discussion

Discussion Calling this method is equivalent to calling the shuffled(using:) method and passing the system sharedRandom() random source. To influence the random shuffling or to be able to deterministically reproduce a series of shuffles, create your own GKRandomSource object.

## See Also

### Randomly Shuffling an Array

- [shuffled(using:)](foundation/nsarray/shuffled(using:).md)
