MutableCollection

extension MutableCollection where Index == Int
  • Returns a random element from the collection.

    Declaration

    Swift

    public func random() -> Iterator.Element

    Return Value

    A random element from the collection.