You should iterate through every element with map
and reverse them.
let playersReversed = players.map { $0.reversed() }
Keep in mind that this will return an array of reversed collections and not an array of arrays of strings. To do that, convert the result of the reversion to Array
:
let playersReversed = players.map { Array($0.reversed()) }
1
solved Reverse every array in an array of arrays in Swift