Contents

popLast()

Removes and returns the last element of the array, if there is one.

Declaration

mutating func popLast() -> Element?

Return Value

The last element of the array if the array is not empty; otherwise, nil.

Discussion