How to reverse an integer array in swift
integer array
eg: var ab = [1,2,3,4]
var ab = [1,2,3,4]
I want to store the array in reverse format.
The result should be
ab = [4,3,2,1]
use ab.reversed() function which returns a reversed array.