Reverse an array


I have an Array and want to reverse it (reverse the order of its contents).


// Initialize the Array
var a = [1,2,3,4,5,6]

// Reverse its contents

a = a.reverse()

Heard the news?

The Swift Cookbook for Swift 3 is at last here! For iBooks, Kindle and Paperback.
Hurry up - and Check it out! ;-)