Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

How to remove the last item from an array in swift

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

print(x.count)
// output : 3
 
PREVIOUS NEXT
Tagged: #How #remove #item #array #swift
ADD COMMENT
Topic
Name
3+2 =