var array = ["a","b","c","d","e","f","g"]
array = array.reverse()
print(array)
To reverse an array in Swift 3 with IBM Swift Sandbox (Swift 3.0 June 20, 2016):
var array = ["a","b","c","d","e","f","g"]
array = array.reversed()
print(array)
Result:
No comments:
Post a Comment