---
title: removeLast()
framework: swift
role: symbol
role_heading: Instance Method
path: swift/outputspan/removelast()
---

# removeLast()

Remove the last initialized element from this span.

## Declaration

```swift
mutating func removeLast() -> Element
```

## Discussion

Discussion Returns the last element. The OutputSpan must not be empty.
