swift shuffle array elements code example Example: shuffle array swift var numbers = [1, 2, 3, 4] numbers.shuffle() // numbers == [3, 2, 1, 4]