Get last element of array

 Problem

I want to get the last element of an Array.



 Recipe


// Initialize the Array
let arr = ["one", "two", "three"]

// Get the last element
let lastElement = arr.last
print(lastElement)
				


 Playground