Skip to content

Glossary: Swift Basics

optional

Also written: optionals, String?

A type written with a `?` that holds either a value or `nil`, like `String?`. You must unwrap it before using the value.

Where the book teaches it

Related terms

nilif letguardforce unwrap