I have one simple array like:
var cellOrder = [1,2,3,4]
I want to exchange elements like suppose a second element with first element.
A
Swift 4
swapAt(_:_:):
cellOrder.swapAt(index0, index1)