What's up with optionals?
nil
by default0
by defaultNice! Optionals are declared with a question mark after the type. Unlike normal variables, they can be nil
, which is also their default value.
Not quite! Optionals are declared with a question mark after the type. Unlike normal variables, they can be nil
, which is also their default value.