Answers for "how to remove the last value in a array swift"

1

pop last element array swift

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

// Remove last item
let lastItem = a.removeLast()

print(lastItem)
print(a)
Posted by: Guest on March-17-2020

Code answers related to "how to remove the last value in a array swift"

Code answers related to "Swift"

Browse Popular Code Answers by Language