If you have an NSMutableArray, how do you shuffle the elements randomly?
NSMutableArray
(I have my own answer for this, which is posted below, but I\'m new to Cocoa an
If you import GameplayKit, there is a shuffled API:
GameplayKit
shuffled
https://developer.apple.com/reference/foundation/nsarray/1640855-shuffled
let shuffledArray = array.shuffled()