Reverse an array

 Problem

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



 Recipe


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

// Reverse its contents

a = a.reverse()
print(a)
				


 Playground