Answers for "remove to last item of list in swift"

0

How to remove the last item from an array in swift

var x = [2, 4, 6, 7]
x.popLast()

print(x.count)
// output : 3
Posted by: Guest on June-16-2021

Code answers related to "remove to last item of list in swift"

Code answers related to "Swift"

Browse Popular Code Answers by Language